[R] Question on Variabeles

From: David1234 <danielthurm_at_web.de>
Date: Sat, 07 Mar 2009 06:52:39 -0800 (PST)

Hi everyone,

Im quite new to R an I have the following Question:

I would like to define Variables which I can add and multiply etc. and that R can simplyfy the terms.

The variables should stand for integers. For example I would like to have an entry in an array with variable z and if I add b+z the field should now contain 2z+b. Or if the field contains 1 and I add z the field should contain 1+z.

How can I solve this problem?

I tried to set z=integer and then for example matrix[1,1]=i But this does only work if I assign a value for z first.

I am very grateful for any help.

Thank you very much!

David

-- 
View this message in context: http://www.nabble.com/Question-on-Variabeles-tp22388117p22388117.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Sat 07 Mar 2009 - 20:22:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 08 Mar 2009 - 17:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive