[R] factors and ops

Erin Hodgess hodgess at gator.dt.uh.edu
Fri May 26 08:33:34 CEST 2006


Dear R People

I have a variable which is an ID number that is a factor.

I would like to look for ID numberbs that are greeater than
a particular value.

However, factors are a big ugly for these operations.

I was messing with the HR data set from the SASmixed package.

HR$Patient is a factor like that.

Now if I used:
subset(HR,as.integer(as.character(Patient)) > 214)

that will work.

If seems to me that there may be a better way.
Is that true?

R Version 2.3.0 Windows

Thanks in advance!


sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgess at gator.uhd.edu



More information about the R-help mailing list