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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.