Re: [R] Header = T

2011-11-23 Thread Jim Lemon
On 11/23/2011 09:38 PM, peter dalgaard wrote: On Nov 23, 2011, at 10:03 , Jim Lemon wrote: On 11/23/2011 06:47 AM, lucky7 wrote: Hi, I just start to use R today! I am reading the R Help on read.csv and the description for header says "header is set to TRUE if and only if the first row contai

Re: [R] Header = T

2011-11-23 Thread peter dalgaard
On Nov 23, 2011, at 10:03 , Jim Lemon wrote: > On 11/23/2011 06:47 AM, lucky7 wrote: >> Hi, >> >> I just start to use R today! I am reading the R Help on read.csv and the >> description for header says "header is set to TRUE if and only if the first >> row contains one fewer field than the numbe

Re: [R] Header = T

2011-11-23 Thread Jim Lemon
On 11/23/2011 06:47 AM, lucky7 wrote: Hi, I just start to use R today! I am reading the R Help on read.csv and the description for header says "header is set to TRUE if and only if the first row contains one fewer field than the number of columns". Why is that? My data has the same number of fie

Re: [R] Header = T

2011-11-22 Thread Richard M. Heiberger
a b A 1 2 B 3 4 C 5 6 The assumption above is that the rownames don't have a header and the columns do. Therefore the default is header=TRUE. r a b A 1 2 B 3 4 C 5 6 In the second example, the first column is called "r" and it is not clear whether that is a column with a variable

Re: [R] Header auslesen und bei Regression verwenden

2011-09-22 Thread Jeff Newmiller
If you explicitly convert your categorical covariates to factors before you regress, you can use the dot notation (see help on lm) to refer to "the rest" of the columns not otherwise specified in your formula. --- Jeff Newmil

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
Tena koe Paul a-1 is not valid syntax in a name hence the conversion. See ?make.names for more information. You could change the names after importing with read.table; e.g. names(whatever)[2] <- 'a-1' but you may regret it later. HTH . Peter Alspach > -Original Message- > From:

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:

Re: [R] header files for R packages

2010-01-24 Thread Romain Francois
On 01/24/2010 04:37 AM, David Lubbers wrote: I have 6 or 7 nice constants (for example 1852 meters per nautical mile) I would like to have available to 4 or 5 functions in an R package. In C this would just be a header .h file and I would just "include" I am stuck trying to figure out how to

Re: [R] Header names when importing csv/excel data sets

2009-09-14 Thread Gabor Grothendieck
See the check.names= argument to read.table. On Mon, Sep 14, 2009 at 9:40 PM, Steven Kang wrote: > Dear R users, > > > Suppose the csv file contains header names such as *"Nike, dunk"*, *"Converse, > All stars"* etc > > When imported to R (with header = T option), the column names are given by: >

Re: [R] header

2007-10-19 Thread John Kane
--- From: Neuer Arkadasch <[EMAIL PROTECTED]> To: Neuer Arkadasch <[EMAIL PROTECTED]>; [EMAIL PROTECTED] Sent: Friday, October 19, 2007 9:30:38 AM Subject: Re: [R] header Maybe I had to write that the original data what I read are name 20_1_TT_Z_e4 20_2_TT_Z_e4 A1 102

Re: [R] header

2007-10-19 Thread Marc Schwartz
See ?make.names, specifically the Details section which notes: A syntactically valid name consists of letters, numbers and the dot or underline characters and starts with a letter or the dot not followed by a number. Names such as ".2way" are not valid, and neither are the reserved words. The cha

Re: [R] header

2007-10-19 Thread Neuer Arkadasch
Maybe I had to write that the original data what I read are name 20_1_TT_Z_e4 20_2_TT_Z_e4 A1 10222 A2 10321 A3 10720 Thatk you! Neuer Arkadasch <[EMAIL PROTECTED]> schrieb: Hi everyone, I read the following