[R] data manipulation help

Zheng Lu zlu at umich.edu
Tue Aug 28 22:59:46 CEST 2007

Dear All:

I have a dataset like 
A=c(0,12,34,5,6,0,4,5,6,0,12,3,4,8,7,0,4,3,5,0,.......),I want to add a 
column to this dataset, it must be in 
B=c(1,1,1,1,1,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,......), How can I create B 
based on the sequence of A. Appreciate.


More information about the R-help mailing list