I am trying to access (read into R) a .csv file hosted on Google Drive (NOT a Drive spreadsheet) -- having set file permission to 'publicly shareable'.
So based on the shareable URL:
sURL <-"https://drive.google.com/file....view?pli=1"
I have been trying to read in using:
library(curl)
x <- curl(sURL)
data <- read.csv(x)
I'm getting this error message:
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
more columns than column names
Any idea what the complaint is about? Thanks guys.
var1,var2,var3,...ect. Is that sufficient?read.csv(text = "col1,col2\n1,2,2,2"), where1is the row name for row #1 and the 32s are fields values; but there are only two column headers defined. Ergo: error..idfrom the URL then paste it to the address with..&export=download. Socurlis not needed. Guess will have to regex to automate the process.