> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of shardman > Sent: Wednesday, August 24, 2011 8:10 AM > To: r-help@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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.