Skip to content
Snippets Groups Projects
Commit 50ddae1d authored by B.Anderson's avatar B.Anderson
Browse files

updated functions with @import & @family where relevant; re-built

parent 076902b2
No related branches found
No related tags found
No related merge requests found
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
export(loadLibraries) export(loadLibraries)
export(setup) export(setup)
export(tidyNum) export(tidyNum)
import(here)
importFrom(utils,install.packages) importFrom(utils,install.packages)
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#' @author Luke Blunden, \email{lsb@@soton.ac.uk} (original) #' @author Luke Blunden, \email{lsb@@soton.ac.uk} (original)
#' @author Michael Harper \email{m.harper@@soton.ac.uk} (revised version) #' @author Michael Harper \email{m.harper@@soton.ac.uk} (revised version)
#' @export #' @export
#' @family utils
#' #'
loadLibraries <- function(..., repo = "https://cran.rstudio.com"){ loadLibraries <- function(..., repo = "https://cran.rstudio.com"){
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#' #'
#' \code{setup} sources env.R in the repo/project top level folder. #' \code{setup} sources env.R in the repo/project top level folder.
#' #'
#' @import here
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} #' @author Ben Anderson, \email{b.anderson@@soton.ac.uk}
#' @export #' @export
#' @family utils #' @family utils
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#' #'
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} #' @author Ben Anderson, \email{b.anderson@@soton.ac.uk}
#' @export #' @export
#' @family utils
#' #'
tidyNum <- function(number) { tidyNum <- function(number) {
format(number, big.mark=",", scientific=FALSE) format(number, big.mark=",", scientific=FALSE)
......
...@@ -24,8 +24,14 @@ Especially useful when running on virtual machines where package installation ...@@ -24,8 +24,14 @@ Especially useful when running on virtual machines where package installation
whereas 'library' throws an error if it can't load the package. Hence 'loadLibraries' whereas 'library' throws an error if it can't load the package. Hence 'loadLibraries'
https://stackoverflow.com/questions/5595512/what-is-the-difference-between-require-and-library https://stackoverflow.com/questions/5595512/what-is-the-difference-between-require-and-library
} }
\seealso{
Other utils:
\code{\link{setup}()},
\code{\link{tidyNum}()}
}
\author{ \author{
Luke Blunden, \email{lsb@soton.ac.uk} (original) Luke Blunden, \email{lsb@soton.ac.uk} (original)
Michael Harper \email{m.harper@soton.ac.uk} (revised version) Michael Harper \email{m.harper@soton.ac.uk} (revised version)
} }
\concept{utils}
...@@ -9,6 +9,11 @@ setup() ...@@ -9,6 +9,11 @@ setup()
\description{ \description{
\code{setup} sources env.R in the repo/project top level folder. \code{setup} sources env.R in the repo/project top level folder.
} }
\seealso{
Other utils:
\code{\link{loadLibraries}()},
\code{\link{tidyNum}()}
}
\author{ \author{
Ben Anderson, \email{b.anderson@soton.ac.uk} Ben Anderson, \email{b.anderson@soton.ac.uk}
} }
......
...@@ -12,6 +12,12 @@ tidyNum(number) ...@@ -12,6 +12,12 @@ tidyNum(number)
\description{ \description{
\code{tidyNum} reformats long numbers to include commas and prevents scientific formats \code{tidyNum} reformats long numbers to include commas and prevents scientific formats
} }
\seealso{
Other utils:
\code{\link{loadLibraries}()},
\code{\link{setup}()}
}
\author{ \author{
Ben Anderson, \email{b.anderson@soton.ac.uk} Ben Anderson, \email{b.anderson@soton.ac.uk}
} }
\concept{utils}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment