Hello,
While creating a table in mlb.db, i’m getting an error. Can someone help me to solve this;
code:
conn <- dbConnect(SQLite(),“mlb.db”)
dbWriteTable(conn, name=“game_log”, value = “game_log.csv”, header=TRUE)
Error":
Error in connection_import_file([email protected], name, value, sep, eol, skip) :
RS_sqlite_import: game_log.csv line 354 expected 161 columns of data but found 164
When I was completing this project, I ran into the same issue. It seemed to happen when I tried to call the csv file directly into dbWriteTable(). Instead, I read in the csv file to memory, then used dbWriteTable() and it seemed to clear out the error.