-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
46 lines (46 loc) · 1.61 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
if(!'RCurl' %in% library()$results[,1]){install.packages('RCurl')}
if(!'dplyr' %in% library()$results[,1]){install.packages('dplyr')}
if(!'stringr' %in% library()$results[,1]){install.packages('stringr')}
library(RCurl);library(dplyr);library(stringr)
data_url = "https://raw.githubusercontent.com/fivethirtyeight/data/master/candy-power-ranking/candy-data.csv"
candy_data = read.csv(text = getURL(data_url), stringsAsFactors = FALSE) %>%
mutate(competitorname = str_replace(competitorname,"Õ","'"))
save(candy_data, file = file.path("data", "candy_data.RData"))
plot_candy = function(df, n = 10, candy_name_col, rank_col){
p = ggplot(df %>% top_n(n, wt=get(rank_col))) +
geom_bar(aes(x = stats::reorder(get(candy_name_col),get(rank_col)), y = get(rank_col)), stat="identity") +
coord_flip() +
labs(x = candy_name_col, y = rank_col)
return(p)
}
library("devtools")
install.packages("devtools")
library("devtools")
devtools::document()
install.packages("Rtools")
version()
version
library("Rtools")
library("Rtools")
install.packages('Rtools')
library("Rtools")
library("Rtools")
install.packages("Rtools")
install.packages(Rtools)
install.packages("devtools")
library(devtools)
library(Rtools)
??Rtools
pkgbuild::rtools_path()
pkgbuild::rtools_path
check_rtools)
check_rtools()
pkgbuild::check_rtools()
install.packages('http://cran.r-project.org/bin/windows/Rtools/')
install.packages("https://cran.r-project.org/bin/windows/Rtools/Rtools35.exe")
install.packages("Rtools")
install.packages("Rtools")
install.packages("Rtools")
library('Rtools')
library("devtools")
install.packages("https://cran.r-project.org/bin/windows/Rtools/Rtools35.exe")