Problem reading data from txt file

Please someone help with this error. when I try loading this data in Rstudio I get this error "DUPLICATE ROW NAMES"

my_data<-read.delim("Aviation.txt")

Can you provide a sample of your Aviation.txt file? This is very likely related to the structure of your data.

Event Id | Investigation Type | Accident Number | Event Date | Location | Country | Latitude | Longitude | Airport Code | Airport Name | Injury Severity | Aircraft Damage | Aircraft Category | Registration Number | Make | Model | Amateur Built | Number of Engines | Engine Type | FAR Description | Schedule | Purpose of Flight | Air Carrier | Total Fatal Injuries | Total Serious Injuries | Total Minor Injuries | Total Uninjured | Weather Condition | Broad Phase of Flight | Report Status | Publication Date |
20191015X24741 | Accident | GAA20CA014 | 10/15/2019 | Colorado Springs, CO | United States | 38.942777 | -104.570000 | FLY | Meadow Lake | Unavailable | Substantial | Airplane | N9708T | Piper | PA38 | No | | | Part 91: General Aviation | | Other Work Use | | | | | | | | Preliminary | 10/15/2019 |
20191014X71714 | Accident | GAA20CA013 | 10/14/2019 | Breckenridge, TX | United States | 32.718889 | -98.891666 | BKD | Stephens County | Non-Fatal | Substantial | Airplane | N850NK | SOCATA | TBM700 | No | 1 | | Part 91: General Aviation | | Personal | | | | | 1 | VMC | | Preliminary | 10/15/2019 |
20191012X90206 | Accident | GAA20CA011 | 10/12/2019 | Island Park, ID | United States | 44.673611 | -111.424445 | | N/A | Unavailable | Substantial | Airplane | N632K | Champion | 8GCBC | No | | | Part 91: General Aviation | | Personal | | | | | | | | Preliminary | 10/15/2019 |
20191010X74218 | Accident | GAA20CA017 | 10/10/2019 | Dayton, OH | United States | 39.588889 | -84.224723 | MGY | Dayton-Wright Brothers | Non-Fatal | Substantial | Airplane | N8078X | Piper | PA28 | No | 1 | | Part 91: General Aviation | | Personal | | | | | 2 | VMC | | Preliminary | 10/15/2019 |
20191011X12800 | Accident | GAA20CA009 | 10/10/2019 | Waynesburg, PA | United States | 39.901111 | -80.130556 | WAY | Greene County | Non-Fatal | Substantial | Airplane | N2343E | Aeronca | 7AC | No | | | Part 91: General Aviation | | Instructional | | | | | 2 | | | Preliminary | 10/15/2019 |

I think you should try specify the delimiter rather than use the default

Sorry for the late reply, I forgot about this thread. In case you haven't solved it yourself, as Nir says you just have to specify the sep argument.

my_data <- read.delim("Aviation.txt", sep = "|")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.