I am trying to read-in a dataset from this zip file link: https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip within an R markdown. Firstly, I used the code called "code1" below, but the console spits out an error message:"
line 1 appears to contain embedded nulls
Error in read.table("https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip", : more columns than column names".
Then I made some adjustment, the other code is called "code2" as shown below, but the console still spits out an error message:
invalid input found on input connection
'https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip'incomplete final line found by readTableHeader on 'https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip'"
I have looked through all the possible solutions online and tried many other ways, but still could not make it to work. Could someone tell me a solution? Really appreciate it!
code1 <- read.table("https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip", header = TRUE, sep = ",")
code2 <- read.table("https://s3.amazonaws.com/hubway-data/201901-bluebikes-tripdata.zip", header = TRUE, sep = ",", fileEncoding = "utf-8", skipNul = TRUE)