Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
read.delim2 did the trick -- many thanks!!! On Wed, Oct 27, 2010 at 10:01 AM, Jorge Ivan Velez wrote: > ?read.delim2 > > HTH, > Jorge > > > On Wed, Oct 27, 2010 at 9:51 AM, Donald Braman wrote: > >> Thanks for your advice! I still get the same error, though -- not sure >> why. >> >> >> > read.t

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 9:51 AM, Donald Braman wrote: Thanks for your advice! I still get the same error, though -- not sure why. > read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table("don.5.clusters.txt", header = TRUE, comment.char = "", : more col

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
Thanks for your advice! I still get the same error, though -- not sure why. > read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table("don.5.clusters.txt", header = TRUE, comment.char = "", : more columns than column names Any other thoughts? --

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-26 Thread Henrique Dallazuanna
Try this: read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote = '') On Tue, Oct 26, 2010 at 1:15 PM, Donald Braman wrote: > That's one of the things I tried, but which didn't work. I get the > following > error when I do that: > > Error in read.table(file = "don.5.clusters.

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-26 Thread Donald Braman
That's one of the things I tried, but which didn't work. I get the following error when I do that: Error in read.table(file = "don.5.clusters.txt", header = TRUE, comment.char = "", : more columns than column names If I remove the hashes by other means, I don't get that error. On Tue, Oct 26

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-26 Thread Duncan Murdoch
On 26/10/2010 10:33 AM, Donald Braman wrote: I'm importing a lot of text tables of data (from Latent Gold) that includes hashes in some of the column names ("Cluster#1", "Cluster#2", etc.). Is there an easy way to strip the offending hashes out before pushing the text into a table or data frame?

[R] stripping #s in a text file prior to reading into table or dataframe

2010-10-26 Thread Donald Braman
I'm importing a lot of text tables of data (from Latent Gold) that includes hashes in some of the column names ("Cluster#1", "Cluster#2", etc.). Is there an easy way to strip the offending hashes out before pushing the text into a table or data frame? I thought I'd use gsub, e.g., but can't figur