On Tue, Dec 23, 2008 at 1:38 PM, David Winsemius <dwinsem...@comcast.net> wrote:
> On Dec 23, 2008, at 1:41 PM, kathie wrote: >> >> Dear R users... >> >> I need to change the S+ code below to R code. >> >> I am wondering if there is a R statement equivalent for "assign" statement >> in S-plus. >> > > ?assign # ???? The problem is not with the assign function per se but with the use of frame = 1 as an argument to assign. R uses evaluation environments and S used evaluation frames. frame = 1 was special, although I have forgotten which one it was. Kathie, I would try removing the call to assign altogether and seeing if the rest of your S-PLUS script works as intended. > > >> >> -------------------------------------------------------- >> >> prime <- function(x) >> { >> 1*(abs(x) < chuber) >> } >> assign("prime",prime,frame=1) >> >> --------------------------------------------------------- >> >> >> Any comments will be greatly appreciated. >> >> Kathryn Lord >> -- >> View this message in context: >> http://www.nabble.com/%22assign%22-statement-in-S-Plus-tp21149319p21149319.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help@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. > > ______________________________________________ > R-help@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. > ______________________________________________ R-help@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.