Re: [R] Header in read.table() function

2010-02-03 Thread Erik Iverson
Paul Evans wrote: Hi All, I hadn't realized the 'a-1' will open such a can of worms! Actually, the header elements will look something like 'ABCD-002-234-01D' (instead of 'a-1'). I get the files from somwhere else, so I cannot change how the input file is. Should I go ahead with the check.na

Re: [R] Header in read.table() function

2010-02-03 Thread Marc Schwartz
rik Iverson > > Cc: r-h...@stat.math.ethz.ch > Sent: Wed, February 3, 2010 4:27:11 PM > Subject: Re: [R] Header in read.table() function > >> If you're data.frame had a >> column named 'a', what should >> >>> mm$a-1 >> >> do?

Re: [R] Header in read.table() function

2010-02-03 Thread Paul Evans
d with the check.names=FALSE option? From: Erik Iverson Cc: r-h...@stat.math.ethz.ch Sent: Wed, February 3, 2010 4:27:11 PM Subject: Re: [R] Header in read.table() function >If you're data.frame had a > column named 'a', what should > &

Re: [R] Header in read.table() function

2010-02-03 Thread Erik Iverson
If you're data.frame had a column named 'a', what should mm$a-1 do? Print out mm$a-1, or subtract 1 from mm$a ? If you want your original matrix back (i.e., object of class matrix), you could just use save/load functions. David found a way to get this in. I read the file in, converted to

Re: [R] Header in read.table() function

2010-02-03 Thread Marc Schwartz
On Feb 3, 2010, at 3:08 PM, Paul Evans wrote: > Hi, > > I wanted to read in a table that had hyphens in the header / column names. > When I read it in however, it replaces the hyphens with a dot. Which > parameter in the read.table function do I need to set to change this > behaviour? > Exampl

Re: [R] Header in read.table() function

2010-02-03 Thread Peter Alspach
sage- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Paul Evans > Sent: Thursday, 4 February 2010 10:09 a.m. > To: r-h...@stat.math.ethz.ch > Subject: [R] Header in read.table() function > > Hi, > > I wanted to rea

Re: [R] Header in read.table() function

2010-02-03 Thread Erik Iverson
Paul Evans wrote: Hi, I wanted to read in a table that had hyphens in the header / column names. When I read it in however, it replaces the hyphens with a dot. Which parameter in the read.table function do I need to set to change this behaviour? Example code: jm <- matrix(1:4,2,2) rownames(jm)

Re: [R] Header in read.table() function

2010-02-03 Thread David Winsemius
On Feb 3, 2010, at 4:08 PM, Paul Evans wrote: Hi, I wanted to read in a table that had hyphens in the header / column names. When I read it in however, it replaces the hyphens with a dot. Which parameter in the read.table function do I need to set to change this behaviour? Example code:

[R] Header in read.table() function

2010-02-03 Thread Paul Evans
Hi, I wanted to read in a table that had hyphens in the header / column names. When I read it in however, it replaces the hyphens with a dot. Which parameter in the read.table function do I need to set to change this behaviour? Example code: jm <- matrix(1:4,2,2) rownames(jm) <- c('a','b') colna