[R] understanding the FUNCTION function

michaelyb cel81009759 at gmail.com
Thu Apr 26 04:06:54 CEST 2012


Hello,

I am trying to understand why the FUNCTION used in several codes, won't
create the object after it finishes running the code.
For instance, look at the following:

Number<- function(x) {MyNumberIs<-x}

When I run 
Number(5)
 Everything goes well, except that if I try to call the object MyNumberIs, I
won't find it.

I understand that this function can assume many parameters, but why won't it
create the object?

Besides, if I try "assing", it won't work either, no matter how I do it.

Any advice/explanation?

Thankk you very much!

--
View this message in context: http://r.789695.n4.nabble.com/understanding-the-FUNCTION-function-tp4588681p4588681.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list