Re: [R] remove ", " at the end of each line for all lines except the first line in a data frame

2011-05-29 Thread xiaerwhite
Thank you very much for your help.I was confused about how to find the length of a file without using the length function. Thank you so much for your answer ,Dennis -- 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-i

[R] remove ", " at the end of each line for all lines except the first line in a data frame

2011-05-28 Thread xiaerwhite
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,