[R] unused argument(s) (Header = True) help!

Daniel Nordlund djnordlund at frontier.com
Wed Aug 24 23:55:55 CEST 2011



> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of shardman
> Sent: Wednesday, August 24, 2011 8:10 AM
> To: r-help at r-project.org
> Subject: [R] unused argument(s) (Header = True) help!
> 
> Hi,
> 
> I'm really new to R so I aoplogise if this is a stupid question.
> 
> I'm trying to import data from a .txt file into R using the read.table
> command, the headers for the data columns are already in the text file so
> I
> add Header = True after the file location. The problem is I keep getting
> the
> error message *unused argument(s) (Header = True)*, does anyone know why?
> 
> The format of the text file is like this (I've also tried spaces rather
> than
> tab to seperate the columns):
> 
> TRAP	SHANNON_INDEX
> 1	3.347
> 2	3.096
> 3	3.521
> 4	2.871
> 5	2.678
> 
> The commond looks like this:
> 
> Trap1_data<-read.table("C:/Documents and
> Settings/Samuel/Desktop/Biology/Independent study/Stats/Diversity
> indices/shannon index results trap 1.txt", Header = True)
> 
 

Sam,

the unused parameter, Header = True, is the problem.  The parameter name is header not Header (no caps).  And, the value for true should be TRUE (ALL caps).

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA



More information about the R-help mailing list