Incomplete final line error when reading 100+ MB CSVs from Google Drive

I'm trying to load twelve CSV files into a RStudio project from my Google Drive since RStudio gives me grief when uploading files. The CSV files over 100 MB give me the following error message:

Warning message:
In read.table(file = file, header = header, sep = sep, quote = quote,  :
  incomplete final line found by readTableHeader on '[FILE ID]&export=download'

I have checked the CSVs and can confirm they end with a new line. Is this error tied to RStudio potentially only reading part of the file? What else would cause the last line to not be read?

Any chance of an encoding issue, such as choking on an embedded multi byte character? Less likely a network latency problem during the read leading to a timeout.

This is not a valid download link for programatic use, that link would require a browser session. You can either use a service like this one to generate a direct link

Or use a package like googledrive to interact with the API

This topic was automatically closed 42 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.