[R] remove ", " at the end of each line for all lines except the first line in a data frame
xiaerwhite
xiaerwhite at hotmail.com
Sat May 28 14:54:46 CEST 2011
the question ask me to use gsub() and subsetting to remove the comma at the
end of the for all but the first value in a data frame.
the first few lines are like the following:
[1] "2177663,-41,175,2678248,6021224,1840,5,25,17,,,6,,"
"2177691,-39.6,176.2,2784798,6173592,1843,7,8,5,30,,7.6,12,"
[3] "2177754,-47,166,1977803,5333806,1846,7,13,6,20,,63,,"
"2177759,-41,172,2425856,6022664,1846,11,18,19,,,65,,"
[5] "2177762,-41,174.5,2636191,6022065,1846,12,4,5,45,,6,,"
"2177819,-41.9,173.60001,2559794,5923028,1848,10,15,14,10,,7.4,12,"
this data frame is called the originalQuakes
thank you for reading this, and please help!
--
View this message in context: http://r.789695.n4.nabble.com/remove-at-the-end-of-each-line-for-all-lines-except-the-first-line-in-a-data-frame-tp3557391p3557391.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list