[R] Invisible Printing

2014-12-12 Thread Dinesh Chowdhary
R 3.1.2 Dear good people I have a very generic question, and please excuse me for the informal format of presenting it? Is invisible printing still persistent in the latest version of R. why to use `invisible(x)` ? Thanking you in anticipation Dinesh [[alternative HTML version deleted

[R] Subsetting R 3.1.2

2014-12-05 Thread Dinesh Chowdhary
> x <- list(seq = 3:7, alpha = c("a", "b", "c")) > x$alpha [1] "a" "b" "c" > x["alpha"] $alpha [1] "a" "b" "c" > x[c(1,2)] $seq [1] 3 4 5 6 7 $alpha [1] "a" "b" "c" *> x[c(1, alpha[2])]* *$* *NULL* *$* *NULL* How to access a character subset withing a list? Thank you for your effort...

[R] Factors and NaN

2014-12-05 Thread Dinesh Chowdhary
R-3.1.2 > x <- factor(c("yes", "yes", "no", NA, "yes", "no", NaN)) > x [1] yes yes noyes no NaN Levels: NaN no yes > is.nan(x) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE >From the above snippet can you notice that the "NaN" value is not logically identified in a vector? Can anyone ela