local({ | |
check_package <- function(pkg) { | |
if (!suppressWarnings(suppressMessages(require(pkg, character.only = TRUE)))) { | |
install.packages(pkg, repos = "http://wush978.github.io/R") | |
} | |
} | |
lapply(c("rappdirs", "bitops", "curl"), check_package) | |
utils::install.packages("swirl", repos = "http://wush978.github.io/R") | |
}) | |
library(swirl) | |
library(curl) | |
library(methods) | |
# Sorry, server.datascienceandr.org is down and will not recover | |
# install_course_url("http://server.datascienceandr.org/swirl/DataScienceAndR.zip") | |
download.file("https://github.com/wush978/DataScienceAndR/archive/course.zip", tmp.file <- tempfile(fileext = ".zip")) | |
unzip(tmp.file, exdir = tempdir()) | |
file.rename(file.path(tempdir(), "DataScienceAndR-course"), file.path(tempdir(), "DataScienceAndR")) | |
swirl::install_course_directory(file.path(tempdir(), "DataScienceAndR")) | |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
lisa84518
commented
Nov 22, 2016
r |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
ChenYuHsin
commented
Apr 9, 2017
123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
r