[R] How to add specific column to data.set?
phillip03
phillipbrigham at hotmail.com
Wed Apr 18 08:24:38 CEST 2012
Wow it works :) Thank you SO much!!
I am very new at R and was thinking if you would explain what these to codes
do:
countries<-data.frame(country1,country2,stringsAsFactors=FALSE)
# I know this i a vector with both my county lists but what does
stringsAsFacors= FALSE do ?. What if I wantede a row with 1=TRUE and 0=FALSE
and
cbind(countries,EMU=Reduce(`&`, lapply(countries,
+ function(x) x %in% euro)))
# here I columnbind my new defined vector and produce a new one ? What does
the Reduce and lapply do ?
I am also not quite sure of the dput() you wrote michael sorry. I understand
if you dont have the time to help further :)
Ph
--
View this message in context: http://r.789695.n4.nabble.com/How-to-add-specific-column-to-data-set-tp4565341p4566822.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list