[R] Confused
Joel
joda2457 at student.uu.se
Mon Feb 7 09:18:49 CET 2011
Hi
Im confused by one thing, and if someone can explain it I would be a happy
> rev(strsplit("hej",NULL))
[[1]]
[1] "h" "e" "j"
> lapply(strsplit("hej",NULL),rev)
[[1]]
[1] "j" "e" "h"
Why dossent the first one work? What is it in R that "fails" so to say that
you need to use lapply for it to get the correct output.
--
View this message in context: http://r.789695.n4.nabble.com/Confused-tp3263700p3263700.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list