data<-read.csv("https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv",header=T,sep=",") -- View this message in context: http://r.789695.n4.nabble.com/How-to-read-CSV-from-web-tp4710502p4710513.html Sent from the R help mailing list archive at Nabble.com.
How about this? library(XML) library(RCurl) url <- "https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv" urldata <- getURL(url) data <- readHTMLTable(urldata, stringsAsFactors = FALSE) On Wednesday, July 29, 2015 at 6:41:35 AM UTC-4, jpara3 wrote:> > data<-read.csv(" > https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv",header=T,sep=",") > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-read-CSV-from-web-tp4710502p4710513.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-h... at r-project.org <javascript:> mailing list -- To UNSUBSCRIBE and > more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Also, you should bookmark this link. http://www.r-bloggers.com/this-r-data-import-tutorial-is-everything-you-need/ On Wednesday, July 29, 2015 at 6:41:35 AM UTC-4, jpara3 wrote:> > data<-read.csv(" > https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv",header=T,sep=",") > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-read-CSV-from-web-tp4710502p4710513.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-h... at r-project.org <javascript:> mailing list -- To UNSUBSCRIBE and > more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Your read.csv call works for me under Windows on "R version 3.2.2 Patched (2015-08-25 r69180)" but not on "R version 3.1.3 Patched (2015-03-16 r68169)". Suggest you upgrade your R installation and try again. If you are on Windowsw and don't want to upgrade right now an alternative is to issue this command first: setInternet2() Also note that header = TRUE and sep = "," are the defaults for read.csv so those arguments can be optionally omitted. On Wed, Jul 29, 2015 at 6:37 AM, jpara3 <j.para.fernandez at hotmail.com> wrote:> data<-read.csv(" > https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv > ",header=T,sep=",") > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-read-CSV-from-web-tp4710502p4710513.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[alternative HTML version deleted]]