Instantly share code, notes, and snippets.

Embed
What would you like to do?
透過80 port 來安裝R語言翻轉教室
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"))
@lisa84518

This comment has been minimized.

Copy link

lisa84518 commented Nov 22, 2016

r

@ChenYuHsin

This comment has been minimized.

Copy link

ChenYuHsin commented Apr 9, 2017

123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment