I have been ripping my hair out with this. I am trying to run the following:
temp <- tempfile()
download.file("http://seanlahman.com/files/database/baseballdatabank-2017.1.zip", temp, mode="wb")
table1 <- unz(temp, "Salaries.csv")
salaries <- read.csv(table1, sep=",", header=T)
However, I think it is not working because the actual file I want (Salaries) is in a folder called 'core' - I looked at the structure by downloading the zipped file to my computer. How can I add something to this code to look in the core folder and get the Salaries data? I want to do this directly from the URL if possible. Thanks!