RE: duplicate ‘row.names’ are not allowed error

R programming language resources Forums Data manipulation RE: duplicate ‘row.names’ are not allowed error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #455
    gsaray101
    Member

    I am trying to call a url that outputs the file as CSV.

    this is the command to get the file:
    systems <- read.table("http://test.net?today.csv", header=TRUE, sep=",") this is what the today.lcsv file looks like: Date,Name,value1,value2,value3,value4 9/2/2011,test1,39037,6.3575,55,100 I get this error: duplicate 'row.names' are not allowed I think the problem is that Date column name is causing. when I take out the Date from the datay.csv file and do a read.table again, it works and it automatically renames the column name as X. Can some one tell me what is going on here?

    #457
    bryan
    Participant

    I’d say you’re correct. It’s hard to tell you the best solution without seeing more of your data; it could also be that you have some unexpected characters in the head of the file. row.names = NULL should allow you to bring in the Date variable. You may also want to use read.csv instead of read.table since you’re bringing in a csv file. It will make the call simpler.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Scroll to top
Privacy Policy