, 4 March 2011 7:58 AM
To: r-help@r-project.org
Subject: [R] creating a count variable in R
Hi R helpers,
I'm trying to create a count in R , but as there is no retain function like
in SAS I'm running into difficulties.
I have the following :
Date_var and wish to o
On Mar 3, 2011, at 3:58 PM, JonC wrote:
Hi R helpers,
I'm trying to create a count in R , but as there is no retain
function like
in SAS I'm running into difficulties.
Your data is not cut-pastable as presented but this should work:
> dfrm$count_var <- ave(as.numeric(dfrm$Date_var), dfrm
, March 03, 2011 1:58 PM
> To: r-help@r-project.org
> Subject: [R] creating a count variable in R
>
> Hi R helpers,
>
> I'm trying to create a count in R , but as there is no retain
> function like
> in SAS I'm running into difficulties.
>
> I have
Hi R helpers,
I'm trying to create a count in R , but as there is no retain function like
in SAS I'm running into difficulties.
I have the following :
Date_var and wish to obtain Date_var
Count_var
01/01/2011
4 matches
Mail list logo