--- Jeff Miller <[EMAIL PROTECTED]> wrote: > Hi all, > > I hope someone can help me with this.
> Suppose I import a text file and one of the columns > looks like this: > > New York > > New York > > England > > Spain > > Spain > > Orlando > > New York > > England > > France > > I want to add a variable that is based on the > previous one > > > > US > > US > > Europe > > Europe > > Europe > > US > > US > > Europe > > Europe > > How do that? ?cbind > Also, I would like to be able to export the data as > a text file that retains > this new variable. > Any suggestions are greatly appreciated, > Jeff Miller ?write.table ?write.csv It might be a good idea to read a bit about how R works. A handy tutorial is http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html and you should have a look at the FAQ and the Intro to R both available the main R site http://www.r-project.org/ ______________________________________________ R-help@stat.math.ethz.ch 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.