34 2946 2010 2.251
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Tuesday, October 30, 2012 1:57 PM
To: Meredith, Christy S -FS
Cc: R help; William Dunlap
Subject: Re: [R] help with for loop: new column giving count of observation for
each SITEID
HI,
You c
Message -
> From: William Dunlap
> To: "Meredith, Christy S -FS"
> Cc: "r-help@r-project.org"
> Sent: Tuesday, October 30, 2012 3:43 PM
> Subject: Re: [R] help with for loop: new column giving count of observation
> for each SITEID
>
> Your data w
;
Cc: "r-help@r-project.org"
Sent: Tuesday, October 30, 2012 3:43 PM
Subject: Re: [R] help with for loop: new column giving count of observation for
each SITEID
Your data was, in R-readable format (from dput())
d <- data.frame(
RchID = 1:9,
site = factor(c(&qu
C 1985 1
> 4D 1985 1
> 5C 2012 1
> 6A 2012 1
> 7B 2012 1
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
>> -Original Message-----
>> From: r-help-boun...@r-project.org
>> [mailto:r-help-boun..
Software
wdunlap tibco.com
> -Original Message-----
> From: Meredith, Christy S -FS [mailto:csmered...@fs.fed.us]
> Sent: Tuesday, October 30, 2012 12:20 PM
> To: William Dunlap
> Subject: RE: [R] help with for loop: new column giving count of observation
> for each
>
, Christy S -FS; r-help@R-project.org
Subject: RE: [R] help with for loop: new column giving count of observation for
each SITEID
Is this what you want?
> withinGroupIndex <- function(group, ...) ave(integer(length(group)), group,
..., FUN=seq_along)
> site <- c("A",
.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Meredith, Christy S -FS
> Sent: Tuesday, October 30, 2012 11:17 AM
> To: r-help@R-project.org
> Subject: [R] help with for loop: new column giving count of observation for
> each SITEID
>
>
> Hello,
> I think th
Hello,
I think this is easy, but I can't seem to find a good way to do this in the R
help. I have a list of sites, with multiple years of data for each site id. I
want to create a new column that gives a number describing whether it is the
1st year ("1" ) the data was collected for the site, th
8 matches
Mail list logo