[R] a question about the computation of expression
PIKAL Petr
petr.pikal at precheza.cz
Fri Jan 4 10:32:24 CET 2013
Hi
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of meng
> Sent: Friday, January 04, 2013 8:00 AM
> To: R help
> Subject: [R] a question about the computation of expression
>
> Hi all:
> I have a question about the computation of expression:
> y = 1+(2x1+2)-3*(5x1-1)+(3x2+3)-2*(x2-1)
>
> The result of y is:
> y = 11-13x1+x2
>
> How can I compute the result of y via R function?
Dou you have x1 and x2? If yes and they are vectors with the same length
y = 11-13*x1+x2
shall do the computation.
Or maybe I did not understand what do you want.
Regards
Petr
>
> Many thanks!
>
> My best.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list