When I type the following in RStudio it works fine:
nyt1 <- read.csv(url("http://stat.columbia.edu/~rachel/datasets/nyt1.csv"))
But when I type the same thing in the R console, I get this error:
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") : cannot open: HTTP status was '0 (nil)'
I have checked and rechecked a thousand times and everything seems to be exactly the same between RStudio and R (same versions, etc), so why the error?