Watts-College / cpp-527-fall-2021

A course shell for CPP 527 Foundations of Data Science II
https://watts-college.github.io/cpp-527-fall-2021/
2 stars 6 forks source link

Reading in Data #91

Closed ndavis4904 closed 2 years ago

ndavis4904 commented 2 years ago

As I am trying to read in the data for 2016-2019, I think that read.csv() is having a hard time because there is a comment in the 7th column that R has a hard time reading. I keep getting the error message "more columns than column names". Is there anyway around that? I have been searching for the better part of an hour to search for a workaround.

ndavis4904 commented 2 years ago

I think I figured it out for anyone else who has this problem. In the read.csv() function, I have added an argument that says colClasses = c(rep(NA,6),"NULL"). Though feel free to correct me if I am off.