I'm trying to download the titanic training data set from Kaggle and am running into issues with download.file(). I've tried all possible values for the method argument, as well as changing the https to http, and the file doesn't seem to download correctly: it seems to be downloading a HTML file and I'm not sure how to fix this.
(the dataset)
https://www.kaggle.com/c/titanic/data
My code...
download.file("https://www.kaggle.com/c/titanic/download/train.csv",
"/Users/marsh/Downloads/data/titanic_train.csv", method = "curl")
test <- read.csv("/Users/marsh/Downloads/data/titanic_train.csv")
test
X.html..head..title.Object.moved..title...head..body.
1 <h2>Object moved to <a href=/account/login?
ReturnUrl=%2fc%2ftitanic%2fdownload%2ftrain.csv>here</a>.</h2>
2
</body></html>