1

I want to import the Kaggle dataset into Rstudio without downloading it at first. I followed this website, Read dataset from Kaggle but it failed, I do not know how to find the username. Could you please help me fix it?

This is my dataset: https://www.kaggle.com/shawon10/web-log-dataset

library(httr)
dataset <- httr::GET("https://www.kaggle.com/shawon10/web-log-dataset?select=weblog.csv", 
                 httr::authenticate(username, authkey, type = "basic"))

temp <- tempfile()
download.file(dataset$url,temp)
data <- read.csv(unz(temp, "train.csv"))
unlink(temp)

enter image description here

benson23
  • 16,369
  • 9
  • 19
  • 38

0 Answers0