-
Notifications
You must be signed in to change notification settings - Fork 8
/
develop.R
101 lines (68 loc) · 2.24 KB
/
develop.R
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# for develop
library(pacman)
p_load(devtools,usethis,roxygen2,pkgdown,badger)
p_load(fst,stringr,data.table,tidyfst,testthat)
devtools::install_github("csgillespie/roxygen2Comment")
# use_test("")
# use_r("global_setting")
rm(list = ls())
document()
install(upgrade = "never",dependencies = F)
#install(upgrade = "never",dependencies = F,quick = T)
#install(quick = T)
.rs.restartR()
library(tidyfst)
testthat::test_package("tidyfst")
# library(tidydt)
options(pkgdown.internet = F)
options(rmarkdown.html_vignette.check_title = FALSE)
build_site(override = list(rmarkdown.html_vignette.check_title = FALSE))
submit_cran()
f <- file.path(tempdir(), "mypackage_thefile.csv")
if (file.exists(f)) {
d <- read.csv(f)
} else {
# download it and save to f
}
# https://github.com/GuangchuangYu/badger
badge_devel("guangchuangyu/ggtree", "blue")
badge_devel("hope-data-science/tidydt", "blue")
a = "abichat"
stringr::str_glue("wget -c \"https://codeload.github.com/{a}/TidyTuesday/zip/master\" -O {a}_tidytuesday.zip")
a = "rstudio/cheatsheets"
stringr::str_glue("wget -c \"https://codeload.github.com/{a}/zip/master\" -O cheatsheet.zip")
use_logo(file.choose())
use_vignette(name = "Introduction",title = "Using data.table the tidy way")
iris %>%
mutate_dt(group = Species,sl = Sepal.Length,sw = Sepal.Width) %>%
select_dt(group,sl,sw) %>%
filter_dt(sl > 5) %>%
arrange_dt(group,sl) %>%
distinct_dt(sl,keep_all = T) %>%
summarise_dt(sw = max(sw),by = group)
usethis::create_package
library(tidyfst)
dt_list = ls("package:tidyfst") %>%
stringr::str_subset("_dt$") %>%
# exclude same function names in base
.[! stringr::str_remove(.,"_dt$") %in% ls("package:base")]
invisible(
lapply(dt_list,
function(x)
assign(stringr::str_remove(x,"_dt$"),
get(x),
envir = globalenv()))
)
iris %>% select("Pe")
test_file(path = "tests/testthat/test-mutate_dt.R")
library(cranlogs)
library(tidyfst)
end_date = "2020-04-09"
cran_downloads(package = "tidyfst", from = "2020-02-10",to = end_date) -> a
a
reprex::reprex({
library(tidyfst)
iris %>%
count_dt(Species) %>%
add_prop()
},venue = "R")