diff --git a/NAMESPACE b/NAMESPACE index d37f9f677c37df6c07d18095a6ecc198f24833cc..c7121c0c8a87afd15e7eda208472f77d45805406 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,8 +4,8 @@ export(findParentDirectory) export(fixCountLabels) export(loadData) export(loadLibraries) -export(outputMessage) export(setYears) +export(setup) export(tidyNum) import(data.table) import(readr) diff --git a/R/dependencies.R b/R/dependencies.R index 4ac8a5dcada770665cf22fc652880b5683a9f4b3..45da9cfac623aeab90bbbad3a7ec6fd1c8560d95 100644 --- a/R/dependencies.R +++ b/R/dependencies.R @@ -1,4 +1,3 @@ # State required packages #' @import data.table -#' @import readr #' @import utils diff --git a/R/setup.R b/R/setup.R new file mode 100644 index 0000000000000000000000000000000000000000..abc2967c79ec29efc6bde72d58e8521f4d47c27f --- /dev/null +++ b/R/setup.R @@ -0,0 +1,11 @@ +#' Sets package parameters etc +#' +#' \code{setup} loads global package parameters and settings +#' +#' +#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} +#' @export +#' +setup <- function() { + source(paste0(here::here(), "/packageSettings.R")) +} diff --git a/R/utilities.R b/R/utilities.R index 630bc6ab007605d5c1795a608e7b5349254752c2..073215e72125b4cc531e5a9656e51f3fe3c1ca7c 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -64,23 +64,4 @@ loadLibraries <- function(..., repo = "https://cran.rstudio.com"){ # Load packages sapply(packages, require, character.only = TRUE) -} - - -#' Concatenate vectors after converting to character and print message -#' -#' \code{outputMessage} -#' Concatenate vectors after converting to character and print message -#' -#' Display a message in the output. Equivalent to \code{print(paste(c(...)))}, also like glue() -#' -#' @param ... one or more R objects, to be converted to character vectors. -#' @param collapse an optional character string to separate the results. Not NA_character_. -#' -#' @author Mikey Harper, \email{m.harper@@soton.ac.uk} -#' @export -outputMessage <- function(..., collapse = NULL){ - - writeLines(paste(..., sep = " ")) - } \ No newline at end of file diff --git a/man/outputMessage.Rd b/man/outputMessage.Rd deleted file mode 100644 index 8e1e9ba24e93a7665e85510518b48678ea1ab7f4..0000000000000000000000000000000000000000 --- a/man/outputMessage.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utilities.R -\name{outputMessage} -\alias{outputMessage} -\title{Concatenate vectors after converting to character and print message} -\usage{ -outputMessage(..., collapse = NULL) -} -\arguments{ -\item{...}{one or more R objects, to be converted to character vectors.} - -\item{collapse}{an optional character string to separate the results. Not NA_character_.} -} -\description{ -\code{outputMessage} -Concatenate vectors after converting to character and print message -} -\details{ -Display a message in the output. Equivalent to \code{print(paste(c(...)))}, also like glue() -} -\author{ -Mikey Harper, \email{m.harper@soton.ac.uk} -} diff --git a/man/setup.Rd b/man/setup.Rd new file mode 100644 index 0000000000000000000000000000000000000000..beb48269205f5916ca6152304fb4e37148aac714 --- /dev/null +++ b/man/setup.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/setup.R +\name{setup} +\alias{setup} +\title{Sets package parameters etc} +\usage{ +setup() +} +\description{ +\code{setup} loads global package parameters and settings +} +\author{ +Ben Anderson, \email{b.anderson@soton.ac.uk} +}