-
Notifications
You must be signed in to change notification settings - Fork 0
/
jupyter.R
91 lines (74 loc) · 1.6 KB
/
jupyter.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
if (!exists("repos_name"))
repos_name <<- getOption("repos")[1]
setrepos <- function(repos=repos) {
repos_name <<- repos
}
load_library <- function(packagename)
{
if (!require(packagename, character.only = TRUE))
{
install.packages(packagename, repos=repos_name, dep=TRUE, quiet = TRUE)
require(packagename, character.only = TRUE)
}
}
load_github <- function(gitname)
{
packagename <- strsplit(gitname,"/")[[1]][2]
if (!require(packagename, character.only = TRUE))
{
devtools::install_github(gitname, force=TRUE, upgrade="never", quiet = TRUE)
require(packagename, character.only = TRUE)
}
}
### functions for package development
if (FALSE) {
library(devtools)
load_all()
}
if (FALSE) {
library(devtools)
suppressWarnings(check(vignettes = FALSE))
load_all()
}
if (FALSE) {
library(devtools)
check()
load_all()
}
if (FALSE) {
library(devtools)
document()
load_all()
}
if (FALSE) {
library(devtools)
devtools::build_manual()
}
if (FALSE) {
#create homepage
#library(devtools)
#usethis::use_readme_rmd()
}
if (FALSE) {
#update documentation
pkgdown::build_site()
}
if (FALSE) {
#update homepage - edit README.Rmd
library(devtools)
devtools::build_readme()
}
if (FALSE) {
devtools::install(dependencies = TRUE, build_vignettes = TRUE)
utils::browseVignettes()
}
if (FALSE) { #build package for cran
#run in RStudio
library(devtools)
pkgbuild::build(manual = TRUE)
#run in terminal
#R CMD check tspredit_1.0.767.tar.gz
#R CMD check tspredit_1.0.767.tar.gz --as-cran
#upload package
#https://cran.r-project.org/submit.html
}