Re: [R] help with checking out-of-range values in each column in data frame

2008-01-28 Thread Gabor Grothendieck
Try: transform(data, f1 = factor(f1, levels = 1:5), f4 = factor(f4, 1:3)) On Jan 28, 2008 8:12 AM, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > I have following data, where I want to check if any value in each > column is out of range. For example, column "f1" can only take values >

[R] help with checking out-of-range values in each column in data frame

2008-01-28 Thread Tom Cohen
Dear list, I have following data, where I want to check if any value in each column is out of range. For example, column "f1" can only take values 1-5, so if any values less than 1 or > 5 will be defined as missing value (i.e. NA), column "f4" can only take values of 1-3 and any values th