Re: [R] Transforming character vector

2010-09-13 Thread Ben Bolker
LCOG1 lcog.org> writes: [snip] > > I need to do the same for a fueltype where each record has a character > representing the data instead of a numeral(as in year). No reproducible > code or data because i think this is pretty straight forward. I could do > this using a series of loops but i t

[R] Transforming character vector

2010-09-13 Thread LCOG1
Hi guys, Cant seem to find a solution for this. I am looking for a substitute for cut that can transform character vectors. So as cut would be used below to transform YearCat-> YearCat2 base on Year and vector Ag<-c("00-'70","'71-'75","'76-'85","'86-'09") using 'cut ' FleetData$YearCat<-cut(F