Some of the names in the columns actually have spaces in them (e.g., S L TX is in one column). So there are really 9. I was able to save the file as a csv file and read.table succesfully.
On Wed, Feb 20, 2013 at 2:03 PM, David Winsemius <dwinsem...@comcast.net>wrote: > > On Feb 20, 2013, at 10:14 AM, Joanna Papakonstantinou wrote: > > > I am getting an error when trying to import tab delimited .txt file saved > > from Excel. > > I have read what is posted on the forums but still am confused. > > > > I saved my Excel file (DataTestforR.xlsx) as a tab delimited txt file > > (DataTestR.txt) on my Desktop. > > In the RGUI, I tried to import the txt file and got an error > > > >> myfile<-"C:\\Users\\jpapa\\Desktop\\DataTestR.txt" > >> mydf<-read.delim(myfile, header=TRUE,sep=" ", dec=".") > > Error in read.table(file = file, header = header, sep = sep, quote = > > quote, : > > duplicate 'row.names' are not allowed > > > > The first row of my file has column names and the first column of my file > > has unique identifing names (not duplicated): > > Cu Sa Na Ci Se NM NPI IPI Seg > > 0090.00 15.48 1 SOM S L TX 0 0.2 0.2 7-Very > > I count 11 data columns and nine column names. > > -- > Alameda, CA, USA > > -- ****************************************************************** *Joanna Papakonstantinou, Ph.D.* [[alternative HTML version deleted]] ______________________________________________ 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.