Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Bert Gunter
; [1] 0 > [1] 0 > > > With Regards, > Vijaya Kumar Regati > Technical Lead, M3bi India Private Ltd > Work: 040-67064732 > > > From: Koustav Pal > Sent: Friday, July 28, 2017 12:25:54 PM > To: Vijaya Kumar Regati > Cc: vijay

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Koustav Pal
gt; > print(y) > > } > > > > > > Wrong output : > > [1] "Passed Values" > > [1] 0 > > [1] 0 > > [1] "After addition :" > > [1] 1 > > [1] 1 > > [1] "Returned Values :" > > [1] 0 > > [1] 0 > > &g

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Mathew Guilfoyle
> [1] 0 > [1] "After addition :" > [1] 1 > [1] 1 > [1] "Returned Values :" > [1] 0 > [1] 0 > > > With Regards, > Vijaya Kumar Regati > Technical Lead, M3bi India Private Ltd > Work: 040-67064732 > > > Fro

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Berend Hasselman
1] 0 > [1] 0 > [1] "After addition :" > [1] 1 > [1] 1 > [1] "Returned Values :" > [1] 0 > [1] 0 > > > With Regards, > Vijaya Kumar Regati > Technical Lead, M3bi India Private Ltd > Work: 040-67064732 > > > From: Koustav Pal > Sent: F

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Vijaya Kumar Regati
12:25:54 PM To: Vijaya Kumar Regati Cc: vijaykr@gmail.com; r-help@R-project.org Subject: Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically c() is used for constructing vectors. Or in other words using the method c(x,y) provides a vector of length 2 (hopefully)

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-28 Thread Koustav Pal
c() is used for constructing vectors. Or in other words using the method c(x,y) provides a vector of length 2 (hopefully). Therefore, you are pushing a single vector to your function and not two arguments as you want. It should be Logic_fn(x,y) not Logic_fn(c(x,y)). Furthermore, i would recommend

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-27 Thread Jeff Newmiller
A function MUST return one object. That one object may consist of a list of objects, but you have to separate the parts out after the function call yourself. -- Sent from my phone. Please excuse my brevity. On July 27, 2017 10:54:08 PM PDT, Vijaya Kumar Regati wrote: >Hi, > > >Can someone pl

Re: [R] R Programming help needed - Returning dataframes + 2 Variables dynamically

2017-07-27 Thread Berend Hasselman
> On 28 Jul 2017, at 07:54, Vijaya Kumar Regati > wrote: > > Hi, > > > Can someone please help me on below issue I am facing : > > > I am trying to play with returning a dataframe+2 variables using a fn. > But facing an issue : > > Error in Logic_fn(c(x, y)) : argument "y" is missing, with

Re: [R] R programming question

2015-09-03 Thread Thierry Onkelinx
Have a look at ?outer outer(1:10, 10:1) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician

Re: [R] R programming

2015-05-23 Thread John Kane
Read R-help. :) Seriously, you will see all kinds of problems and questions. Some of the simpler ones you can try yourself and see how your approach matches other peoples. Google around for some R blogs and see if you find any that are useful. https://learnr.wordpress.com/ might be useful. IIR

Re: [R] R programming

2015-05-23 Thread Rich Shepard
On Fri, 22 May 2015, varun joshi wrote: What should I do to learn gradually? Not sure how one gradually learns; I suppose it depends on what sort of applications one wants to develop and the most effective means by which one learns. Regardless, a good place to start is by buying and reading

Re: [R] R programming

2015-05-22 Thread Jim Lemon
Hi varun, A few suggestions. Learn to use the built in help system, whichever version (text, HTML, PDF) you prefer. Learn to use one of the search programs (see http://cran.r-project.org/search.html) Try to do every task that you can in R. Jim On Sat, May 23, 2015 at 9:01 AM, varun joshi wrote:

Re: [R] R programming

2015-05-22 Thread Jeff Newmiller
Practice (use the str function frequently, print small pieces of complex expressions to understand how they are constructed). Read the Introduction to R document. Especially the part about indexing. Read Pat Burns' The R Inferno. Also remember to post in plain text on this list next time -

Re: [R] R programming

2015-05-22 Thread Shivi82
Hi Varun, Courses offered from Coursera & EDX are very informative and carry details in depth. However I agree with your point that these courses are very fast paced & sometimes very technical in nature. (I found the same when I went for Linear regression course) I have also recently started lear

Re: [R] R programming style

2008-02-12 Thread hadley wickham
On Feb 12, 2008 9:07 AM, Terry Therneau <[EMAIL PROTECTED]> wrote: > David Scott asked > "Views on Bengtsson's ideas would interest me as well." > > I have only one serious disagreement with their suggestions > >"6.3.2 In general, the use of comments should be minimized by making the > code

Re: [R] R programming style

2008-02-12 Thread Terry Therneau
David Scott asked "Views on Bengtsson's ideas would interest me as well." I have only one serious disagreement with their suggestions "6.3.2 In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structu

Re: [R] R programming style

2008-02-11 Thread Barry Rowlingson
Roland Rau wrote: > Hi, > > I think using Emacs+ESS [1,2] is always a good starting point for a > clear layout with consistent and meaningful indentation. > > I don't know how other people think about it, but in my opinion, > "Elements of Programming Style" by Kernighan and Plauger is still an

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, Earl F. Glynn wrote: > Instead of using "1" or "2" in an "apply", I'll write something like this > trying for some sort of mnemonic > > apply(x, BY.ROW<-1, sum) > or > apply(z, BY.COL<-2, mean) > It think it makes sense to use those "magic numbers" in the given case. Please let me give you

Re: [R] R programming style

2008-02-11 Thread Scillieri, John
PROTECTED] On Behalf Of Earl F. Glynn Sent: Monday, February 11, 2008 2:30 PM To: [EMAIL PROTECTED] Subject: Re: [R] R programming style "David Scott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Can anyone provide further pointers to good style? While not

Re: [R] R programming style

2008-02-11 Thread Earl F. Glynn
"David Scott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Can anyone provide further pointers to good style? While not written for R specifically, the book "Code Complete: A Practical Handbook of Software Construction" (2nd Edition) discusses a number of good concepts for w

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, I think using Emacs+ESS [1,2] is always a good starting point for a clear layout with consistent and meaningful indentation. I don't know how other people think about it, but in my opinion, "Elements of Programming Style" by Kernighan and Plauger is still an interesting read -- although th

Re: [R] R programming style

2008-02-11 Thread Bernard Leemon
I just got a copy of A First Course in Statistical Programming with R by W. John Braun and Duncan J. Murdoch. Cambridge. at amazon: http://www.amazon.com/First-Course-Statistical-Programming-R/dp/0521694248/ first couple of chapters are base R that most everyone would know before wanting to pro