Skip to content
Prev 22838 / 398502 Next

is.numeric()

Thank you Thomas for poiting out the different sorts of NA (which was
really the core of my problem). Thanks also to Patrick Burns, who
refered me to page 17 of the book ``S Poetry'' (available at :
http://www.i-way.co.uk/~pat/Spoetry ).


I still have a problem with vectorizing is.numeric() for a logical
vector :

vec <- c(TRUE, FALSE, NA, NA)
sapply(vec,FUN=is.numeric)
is.numeric(vec[2])
is.numeric(vec[3])


gives:
[1] TRUE TRUE TRUE TRUE
[1] FALSE
[1] FALSE


Cheers Ole



platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    5.1              
year     2002             
month    06               
day      17               
language R
Thomas Lumley wrote: