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:
http://r.789695.n4.nabble.com/operator-is-in
> 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
On 14.09.2012 22:16, Steve Lianoglou wrote:
> Hi,
>
> On Fri, Sep 14, 2012 at 2:33 PM, agrins 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="",
>
Hi,
On Fri, Sep 14, 2012 at 2:33 PM, agrins 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 (!is.
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
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 vec
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,
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
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
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
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 cour
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).
12 matches
Mail list logo