Hi All, Can you please tell me if i write a function, and want to return certain object, can "R" work on it? I know this works in S-Plus. function(x) { ....... a<-...... reaturn(a) } Does this work in "R"? Thanks, Sumanta. --------------------------------- What makes Sachin India's highest paid sports celebrity?, Share your knowledge on Yahoo! India Answers Send instant messages to your online friends - NOW [[alternative HTML version deleted]]
SUMANTA BASAK wrote:> Hi All, > Can you please tell me if i write a function, and want to return certain object, can "R" work on it? I know this works in S-Plus. > > function(x) > { ....... > a<-...... > reaturn(a) > } > > Does this work in "R"?What about trying it out yourself or reading the docs rather than wasting bandwidth and asking thousands of readers for help wasting their time? > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Short answer: No Long answer: Works neither in R nor in S-PLUS unless your correct the typo. After fixing the typo, it will work in both. Uwe Ligges> Thanks, > Sumanta. > > > --------------------------------- > What makes Sachin India's highest paid sports celebrity?, Share your knowledge on Yahoo! India Answers > Send instant messages to your online friends - NOW > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi On 12 May 2006 at 11:02, SUMANTA BASAK wrote: Date sent: Fri, 12 May 2006 11:02:44 +0100 (BST) From: SUMANTA BASAK <r_econometrics at yahoo.co.in> To: R HELP <r-help at stat.math.ethz.ch> Subject: [R] Basic function help> Hi All, > Can you please tell me if i write a function, and want to return > certain object, can "R" work on it? I know this works in S-Plus. > > function(x) > { ....... > a<-...... > reaturn(a)return(a) is better :-)> } > > Does this work in "R"?Yes> > Thanks, > Sumanta. > > > --------------------------------- > What makes Sachin India's highest paid sports celebrity?, Share your > knowledge on Yahoo! India Answers Send instant messages to your > online friends - NOW [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.htmlPetr Pikal petr.pikal at precheza.cz