-
Notifications
You must be signed in to change notification settings - Fork 45
/
build.R
executable file
·71 lines (56 loc) · 2.24 KB
/
build.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
##### For the R package ########################################################
library(devtools)
source('data-raw/psa_citations.R') # Build the psa_citations data file
usethis::use_tidy_description()
devtools::document()
devtools::install(upgrade = 'never')
devtools::install(upgrade = 'never', build_vignettes = TRUE)
devtools::build()
devtools::build_readme()
devtools::check(cran = TRUE)
# Can run this if there is an error about checking the time
# Sys.setenv('_R_CHECK_SYSTEM_CLOCK_' = 0)
# Install packages
install.packages(c('cowplot', 'dplyr', 'ggplot2', 'grid', 'Matching', 'MatchIt',
'mice', 'plyr', 'psych', 'remotes', 'reshape2', 'shiny'))
install.packages(c('knitr', 'lubridate', 'mvtnorm', 'party', 'rmarkdown', 'stargazer'))
install.packages(c(#'granovaGG',
'bookdown', 'devtools', 'granova', 'GGally',
'multilevelPSA',
# 'PSAboot',
'PSAgraphics', 'rgenoud',
'scholar', 'rbounds', 'tree', 'TriMatch', 'badger', 'BART',
'randomForest', 'stargazer', 'gdata'))
remotes::install_github('briandk/granovaGG')
remotes::install_github('jbryer/PSAboot')
################################################################################
# For the bookdown site
# library(bookdown)
wd <- setwd('book')
bookdown::render_book(input = "index.Rmd", output_format = "bookdown::bs4_book")
# bookdown::render_book(input = "index.Rmd", output_format = "bookdown::pdf_book")
setwd(wd)
library(RefManageR)
GetBibEntryWithDOI('10.1093/biomet/70.1.41')
################################################################################
# For the Slides
rmarkdown::render('Slides/Intro_PSA.Rmd')
renderthis::to_pdf('Slides/Intro_PSA.html',
complex_slides = TRUE,
partial_slides = FALSE)
################################################################################
# Shiny Applications
# library(psa)
psa::psa_simulation_shiny()
psa::psa_shiny()
################################################################################
# Basic package functions
library(psa)
ls('package:psa'). # List functions
data(package = 'psa') # List datasets
# Shiny App from installed package
psa::psa_shiny()
# Vignettes
browseVignettes(package='psa')
vignette('MatchBalance', package = 'psa')
vignette('Missingness', package = 'psa')