gunter.berton at gene.com
Tue Oct 23 22:17:02 CEST 2012
Are the data in a data frame? Is it the first letter of the id that
defines unique ID's or something else?
Depending on your answers:
may be useful, as in with(yourdata,table(substring(ID,1,1)))
... or not, if you meant something else.
On Tue, Oct 23, 2012 at 12:14 PM, farnoosh sheikhi
<farnoosh_81 at yahoo.com> wrote:
> I have a data as follow:
> ID Visit
> I want to look at frequency of visit for ID and create a new column as response .
> For example my response would be 2 for x and 3 for y.
> I think I need to write a loop, but I don't know how.
> I really appreciate your help.
> Thanks a lot.
> Best,Farnoosh Sheikhi
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Genentech Nonclinical Biostatistics
Internal Contact Info:
More information about the R-help