0

I imported a txt file into R, but part of the data shows up as a blank white square in one row. When I hover over the square, I can see the lyrics data separated by commas, but I'm not sure how to tidy the data for analysis.

I used the following code to import the data:

mxm <- read.delim("mxm_dataset_train.txt") 
colnames(mxm) <-c("Description") 
mxm <- mxm[-c(1:16), ]

I removed the first 16 rows because they were comments.

Screenshot

Martin Gal
  • 16,640
  • 5
  • 21
  • 39
hlee28
  • 3
  • 1
  • 1
    Hi and welcome to SO. Take a look at how to make a [great reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for ways of showing data. – Martin Gal Jun 03 '20 at 20:46
  • Try `read.csv` or `read.csv2` – Martin Gal Jun 03 '20 at 20:50

0 Answers0