-
Notifications
You must be signed in to change notification settings - Fork 14
How to Develop
Kei Saito edited this page May 21, 2016
·
4 revisions
You need following packages before starting development.
- roxygen2
- devtools
- testthat
> install.packages(c("roxygen2", "devtools", "testthat"))
> library("roxygen2")
> library("devtools")
> library("testthat")
$ git clone [email protected]:exploratory-io/exploratory_func.git
1). Open Exploratory, go [Tools]
-> [Diagnostics]
-> [Run Diagnostics]
and open diagnostics.txt
.
2). Find the exploratory package version under "other attached packages:"
section. In following exmaple, it is 0.1.4
.
3). Open DESCRIPTION
file and update Version
to match with the version we found above in step #2.
Package: exploratory
Type: Package
Title: R package for Exploratory
Version: 0.1.4
Date: 2016-05-13
4). On R, set the current working dir to the checked out repository.
setwd("/Users/kei/Documents/gitrepos/exploratory_func")
5). Run build
command.
> devtools::build(binary=TRUE)
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
'/Users/kei/Documents/gitrepos/exploratory_func' --build
* installing to library ‘/private/var/folders/nb/q827tn_966q2vftg10kz89gr0000gp/T/RtmpSlWK1Q/temp_libpath48991c1fb118’
* installing *source* package ‘exploratory’ ...
** R
** preparing package for lazy loading
** help
No man pages found in package ‘exploratory’
*** installing help indices
** building package indices
** testing if installed package can be loaded
* creating tarball
packaged installation of ‘exploratory’ as ‘exploratory_0.1.4.tgz’
* DONE (exploratory)
[1] "/Users/kei/Documents/gitrepos/exploratory_0.1.4.tgz"
- Start R console and set the Exploratory Desktop's library folder (
[your home directory]/.exploratory/R/[R version]
) to '.libPaths' like below.
> .libPaths("~/.exploratory/R/3.3")
2). Call install.packages
with the package tgz file created in the build step above.
> install.packages("../exploratory_0.1.4.tgz", repos = NULL, type="source")
Installing package into ‘/Users/kei/.exploratory/R/3.3’
(as ‘lib’ is unspecified)
* installing *binary* package ‘exploratory’ ...
* DONE (exploratory)
3). Restart Exploratory and your change will be available on Exploratory.