Dear R helpers I have a city.csv file as given below. 'city.csv' city_name1 city_name2 New York City Buffallo So I define city_name = read.csv('city.csv') city1 = city_name$city_name1 city2 = city_name$city_name2 My problem is how do I repeat the names one after other say 10 times i.e. my output should be like New York City Buffallo New York City Buffallo New York City Buffallo New York City ................... ................... ................... ................... I have tried the following commands rep(c(city1,city2), 5) and I got the output something like this [1] 1 1 1 1 1 1 ....... If I try rep((city1,city2), 5) Error: unexpected ',' in "rep((city1," Please guide Regards MAdhavi
Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ [[alternative HTML version deleted]]
______________________________________________ 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.