Re: [R] $ operator is invalid for atomic vectors

2015-02-11 Thread JS Huang
Hi, If x is a data frame, then x$getmean will try to get the vector named getmean in x. You put () after x$getmean. I think r is confused about it. It appears that you want to call a function named getmean(). -- View this message in context:

Re: [R] $ operator is invalid for atomic vectors

2012-09-15 Thread mlell08
On 14.09.2012 22:16, Steve Lianoglou wrote: Hi, On Fri, Sep 14, 2012 at 2:33 PM, agrins agri...@d.umn.edu wrote: HI all- I have used this .fun in S+ without a problem however, in R when I run this code to generate multiple graphs: trendplot-function(datafr,dataf2, abbrev=, titlestr=,

Re: [R] $ operator is invalid for atomic vectors

2012-09-15 Thread R. Michael Weylandt
2) Make the vector a list. I don't know if there are side-Effects to this, but perhaps it's just the anxiety of a Java-Programmer who isn't used to the somewhat easy-going way R deals with classes: class(dataf2) - list Indeed, there are _many_ side effects to this and you really should

[R] $ operator is invalid for atomic vectors

2012-09-14 Thread agrins
HI all- I have used this .fun in S+ without a problem however, in R when I run this code to generate multiple graphs: trendplot-function(datafr,dataf2, abbrev=, titlestr=, devname=s,filen=,styr=1990,endyr=2012) { if (!is.null(dev.list())) {dev.off()} dataf-datafr[datafr$abbrev==abbrev,]

Re: [R] $ operator is invalid for atomic vectors

2012-09-14 Thread Steve Lianoglou
Hi, On Fri, Sep 14, 2012 at 2:33 PM, agrins agri...@d.umn.edu wrote: HI all- I have used this .fun in S+ without a problem however, in R when I run this code to generate multiple graphs: trendplot-function(datafr,dataf2, abbrev=, titlestr=, devname=s,filen=,styr=1990,endyr=2012) { if

[R] $ operator is invalid for atomic vectors

2012-04-19 Thread Ana-Maria Dobre
I have got the following statement: * overview.domains$sample.var - aggregate(migr$amigo.migr, by=list(siruta=amigo$siruta), var)[,-1]/overview.domains$n.i.* *Error in migr$amigo.migr : $ operator is invalid for atomic vectors* What should i do to solve this error? Thank you. Kind regards,

Re: [R] $ operator is invalid for atomic vectors

2012-04-19 Thread Milan Bouchet-Valat
Le jeudi 19 avril 2012 à 09:34 +0300, Ana-Maria Dobre a écrit : I have got the following statement: * overview.domains$sample.var - aggregate(migr$amigo.migr, by=list(siruta=amigo$siruta), var)[,-1]/overview.domains$n.i.* *Error in migr$amigo.migr : $ operator is invalid for atomic vectors*

Re: [R] $ operator is invalid for atomic vectors

2011-01-18 Thread Pete Brecknock
Amy It would have been helpful if you had sent your R code of how you constructed the sab object. If you have a data.frame, the subset command you are having trouble with should work fine. See below. # Working Example sab = data.frame(group=c('Group A', 'Group A', 'Group C', 'Group B', 'Group

[R] $ operator is invalid for atomic vectors, returning NULL - what is the right thing to do then?

2007-12-06 Thread Søren Højsgaard
Dear all, Starting from a recent version of R, the $ became unusable on atomic vectors, e.g. x - c(a=1,b=2) x$a NULL Warning message: In x$a : $ operator is invalid for atomic vectors, returning NULL I can of course do x['a'] - but that requires more typing (5 characters rather than 2).

Re: [R] $ operator is invalid for atomic vectors, returning NULL - what is the right thing to do then?

2007-12-06 Thread Prof Brian Ripley
On Thu, 6 Dec 2007, Søren Højsgaard wrote: Dear all, Starting from a recent version of R, From R 2.5.0, not so recent. the $ became unusable on atomic vectors, e.g. x - c(a=1,b=2) x$a NULL Warning message: In x$a : $ operator is invalid for atomic vectors, returning NULL I can of course

Re: [R] $ operator is invalid for atomic vectors, returning NULL

2007-12-06 Thread Ted Harding
On 06-Dec-07 12:04:56, Søren Højsgaard wrote: Dear all, Starting from a recent version of R, the $ became unusable on atomic vectors, e.g. x - c(a=1,b=2) x$a NULL Warning message: In x$a : $ operator is invalid for atomic vectors, returning NULL I can of course do x['a'] - but that

Re: [R] $ operator is invalid for atomic vectors, returning NULL - what is the right thing to do then?

2007-12-06 Thread Duncan Murdoch
On 12/6/2007 7:04 AM, Søren Højsgaard wrote: Dear all, Starting from a recent version of R, the $ became unusable on atomic vectors, e.g. x - c(a=1,b=2) x$a NULL Warning message: In x$a : $ operator is invalid for atomic vectors, returning NULL I can of course do x['a'] - but that