Skip to content
Prev 199109 / 398506 Next

creating mulptiple new variables from one data.frame according to columns and rows in that frame

My guess is that we are being affected by FAQ 7.31 (good old floating
point numbers).  The test 'age %in% 5:50' might be affected by round
off.  Something like the following might be better:

age < 5 | (abs(age - round(age)) < 0.001)

This should give TRUE for all ages that are 'close' to the year.  Take
a look at your data where you thing values might be missing and set
'options(digit=20)' to print out the full values.
On Wed, Nov 4, 2009 at 8:03 AM, Hayes, Daniel <D.J.Hayes at liverpool.ac.uk> wrote: