forked from ellieallien/hypegrammaR
-
Notifications
You must be signed in to change notification settings - Fork 9
/
package_building.R
51 lines (39 loc) · 1.24 KB
/
package_building.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
rm(list=ls());if(!("rstudioapi" %in% installed.packages()[,"Package"])){install.packages("rstudioapi")};require("rstudioapi");
setwd(dirname(rstudioapi::getActiveDocumentContext()$path));setwd("./")
getwd()
rstudioapi::isAvailable("0.99.149")
devtools::install_github("r-lib/devtools")
install.packages("reshape")
#
usethis::use_package("reshape",type = "Depends")
usethis::use_package("questionr",type = "Depends")
usethis::use_package("knitr",type = "Depends")
usethis::use_package("dplyr",type = "Depends")
usethis::use_package("tidyr",type = "Depends")
usethis::use_package("magrittr",type = "Depends")
library(roxygen2)
library(devtools)
library(survey)
library(dplyr)
library(magrittr)
library(questionr)
has_devel()
print(has_devel())
.onLoad <- function(libname, pkgname){
packageStartupMessage("Welcome to a package that does statistics")
}
usethis::use_test()
print(rtools_path() )
has_rtools()
devtools::build()
devtools::load_all()
devtools::document()
devtools::test()
devtools::build_vignettes()
### Making the package more efficient
install.packages("profvis")
library(profvis)
### From Chiara's RMD
# profvis({
# Output <- from_analysisplan_map_to_output(clData, analysisplan = myPlan, weighting = thisWeighting, questionnaire = quest)
# })