-
Notifications
You must be signed in to change notification settings - Fork 8
/
refresh.Rd
68 lines (60 loc) · 2.44 KB
/
refresh.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/refresh.R
\name{refresh}
\alias{refresh}
\title{Refresh a package/research compendium}
\usage{
refresh(compendium = NULL, make = FALSE, check = FALSE, quiet = FALSE)
}
\arguments{
\item{compendium}{A character of length 1. The name of the folder to
recursively detect dependencies to be added to the \code{Imports} field of
\code{DESCRIPTION} file. It can be \code{'analysis/'} (if additional folders, i.e.
\verb{data/}, \verb{outputs/}, \verb{figures/}, etc. have been created in this folder),
\code{'.'} (if folders \verb{data/}, \verb{outputs/}, \verb{figures/}, etc. have been created
at the root of the project), etc.
See \code{\link[=new_compendium]{new_compendium()}} for further information.
Default is \code{compendium = NULL} (i.e. no additional folder are inspected
but \verb{R/}, \code{NAMESPACE}, \verb{vignettes/}, and \verb{tests/} are still inspected).}
\item{make}{A logical value. If \code{TRUE} the Make-like R file \code{make.R} is
sourced. Only for research compendium created with \code{\link[=new_compendium]{new_compendium()}}.
Default is \code{FALSE}.}
\item{check}{A logical value. If \code{TRUE} package integrity is checked using
\code{\link[devtools:check]{devtools::check()}}.
Default is \code{FALSE}.}
\item{quiet}{A logical value. If \code{TRUE} (default) message are deleted.}
}
\value{
No return value.
}
\description{
\strong{This function is about to be removed from \code{rcompendium}.}
This function refreshes a package/research compendium. It will:
\itemize{
\item Update \code{.Rd} files and \code{NAMESPACE} by using \code{\link[devtools:document]{devtools::document()}};
\item Update external packages (in \code{DESCRIPTION} file) by using
\code{\link[=add_dependencies]{add_dependencies()}};
\item Update badges in \code{README.Rmd} (if already present);
\item Re-knitr the \code{README.Rmd} by using \code{\link[rmarkdown:render]{rmarkdown::render()}};
\item Check package integrity by using \code{\link[devtools:check]{devtools::check()}};
\item Run analysis by sourcing \code{make.R} (only for compendium).
}
}
\examples{
\dontrun{
library(rcompendium)
## Create an R package ----
new_package()
## Start developing functions ----
## ...
## Update package (documentation, dependencies, README) ----
refresh()
}
}
\seealso{
Other setup functions:
\code{\link{new_compendium}()},
\code{\link{new_package}()},
\code{\link{set_credentials}()}
}
\concept{setup functions}