From 95630f60d196c61fa1b225ec1d4d38cbcb0acf29 Mon Sep 17 00:00:00 2001 From: katieb1 Date: Thu, 30 Nov 2023 09:44:37 -0800 Subject: [PATCH] Renamed addPackage to installPackage --- DESCRIPTION | 2 +- NAMESPACE | 4 +-- R/addon.R | 2 +- R/breakpoint.R | 6 ++--- R/command.R | 2 +- R/datasheet.R | 2 +- R/datasheetRaster.R | 4 +-- R/datasheetSpatRaster.R | 4 +-- R/deprecated.R | 16 ++++++------ R/disableAddon.R | 2 +- R/enableAddon.R | 2 +- R/{addPackage.R => installPackage.R} | 26 +++++++++---------- R/package.R | 2 +- R/parentId.R | 2 +- R/run.R | 2 +- R/runLog.R | 2 +- R/saveDatasheet.R | 2 +- R/sqlStatement.R | 2 +- R/ssimLibrary.R | 10 +++---- .../a01_rsyncrosim_vignette_basic.html | 10 +++---- .../a02_rsyncrosim_vignette_uncertainty.html | 6 ++--- .../a03_rsyncrosim_vignette_pipelines.html | 6 ++--- .../a04_rsyncrosim_vignette_spatial.html | 6 ++--- .../a05_rsyncrosim_stsim_vignette.html | 6 ++--- docs/articles/rsyncrosim_stsim_vignette.html | 2 +- docs/articles/rsyncrosim_vignette_basic.html | 12 ++++----- .../rsyncrosim_vignette_pipelines.html | 8 +++--- .../articles/rsyncrosim_vignette_spatial.html | 8 +++--- .../rsyncrosim_vignette_uncertainty.html | 8 +++--- docs/reference/addBreakpoint.html | 2 +- docs/reference/addModule.html | 4 +-- docs/reference/addPackage.html | 18 ++++++------- docs/reference/addPackageFile.html | 10 +++---- docs/reference/addon.html | 2 +- docs/reference/breakpoint.html | 2 +- docs/reference/command.html | 2 +- docs/reference/datasheet.html | 2 +- docs/reference/datasheetRaster.html | 4 +-- docs/reference/datasheetSpatRaster.html | 4 +-- docs/reference/deleteBreakpoint.html | 2 +- docs/reference/disableAddon.html | 2 +- docs/reference/enableAddon.html | 2 +- docs/reference/index.html | 2 +- docs/reference/package.html | 2 +- docs/reference/parentId.html | 2 +- docs/reference/run.html | 2 +- docs/reference/runLog.html | 2 +- docs/reference/saveDatasheet.html | 2 +- docs/reference/sqlStatement.html | 2 +- docs/reference/ssimLibrary.html | 6 ++--- docs/sitemap.xml | 4 +-- man/addBreakpoint.Rd | 2 +- man/addModule.Rd | 2 +- man/addPackage.Rd | 24 ++++++++--------- man/addPackageFile.Rd | 8 +++--- man/addon.Rd | 2 +- man/breakpoint.Rd | 2 +- man/command.Rd | 2 +- man/datasheet.Rd | 2 +- man/datasheetRaster.Rd | 4 +-- man/datasheetSpatRaster.Rd | 4 +-- man/deleteBreakpoint.Rd | 2 +- man/disableAddon.Rd | 2 +- man/enableAddon.Rd | 2 +- man/package.Rd | 2 +- man/parentId.Rd | 2 +- man/run.Rd | 2 +- man/runLog.Rd | 2 +- man/saveDatasheet.Rd | 2 +- man/sqlStatement.Rd | 2 +- man/ssimLibrary.Rd | 6 ++--- tests/testthat/test-unit.R | 6 ++--- using-conda-with-rsyncrosim.Rmd | 2 +- vignettes/a01_rsyncrosim_vignette_basic.Rmd | 10 +++---- .../a02_rsyncrosim_vignette_uncertainty.Rmd | 6 ++--- .../a03_rsyncrosim_vignette_pipelines.Rmd | 6 ++--- vignettes/a04_rsyncrosim_vignette_spatial.Rmd | 6 ++--- vignettes/a05_rsyncrosim_stsim_vignette.Rmd | 6 ++--- 78 files changed, 182 insertions(+), 182 deletions(-) rename R/{addPackage.R => installPackage.R} (73%) diff --git a/DESCRIPTION b/DESCRIPTION index 214d782f..74241f0a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -46,7 +46,7 @@ Suggests: SystemRequirements: SyncroSim (>=2.3.10) Collate: 'AAAClassDefinitions.R' - 'addPackage.R' + 'installPackage.R' 'addRow.R' 'addon.R' 'autogentags.R' diff --git a/NAMESPACE b/NAMESPACE index 3e1a5e32..8a770f4c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -20,8 +20,8 @@ export(Session) export(SsimLibrary) export(addBreakpoint) export(addModule) -export(addPackage) -export(addPackageFile) +export(installPackage) +export(installPackageFile) export(addRow) export(addon) export(autogentags) diff --git a/R/addon.R b/R/addon.R index 95233a48..d719cf36 100644 --- a/R/addon.R +++ b/R/addon.R @@ -25,7 +25,7 @@ NULL #' @examples #' \donttest{ #' # Install the base package "stsim" -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib") diff --git a/R/breakpoint.R b/R/breakpoint.R index 1a59087f..340eb87f 100644 --- a/R/breakpoint.R +++ b/R/breakpoint.R @@ -224,7 +224,7 @@ getBPNameLongForm <- function(breakpointType) { #' } #' #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set SsimLibrary name #' myLibraryName <- file.path(tempdir(),"testlib") @@ -290,7 +290,7 @@ setMethod("addBreakpoint", signature(x = "Scenario"), function(x, transformerNam #' } #' #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set SsimLibrary name #' myLibraryName <- file.path(tempdir(),"testlib") @@ -369,7 +369,7 @@ setMethod("deleteBreakpoint", signature(x = "Scenario"), function(x, transformer #' } #' #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set SsimLibrary name #' myLibraryName <- file.path(tempdir(),"testlib") diff --git a/R/command.R b/R/command.R index 41e03090..11cbc162 100644 --- a/R/command.R +++ b/R/command.R @@ -35,7 +35,7 @@ NULL #' @examples #' \dontrun{ #' # Install "stsim" if not already installed -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib.ssim") diff --git a/R/datasheet.R b/R/datasheet.R index c1e2dad1..2561a52e 100644 --- a/R/datasheet.R +++ b/R/datasheet.R @@ -90,7 +90,7 @@ NULL #' @examples #' \dontrun{ #' # Install helloworldSpatial package from package server -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_datasheet") diff --git a/R/datasheetRaster.R b/R/datasheetRaster.R index 36b426ef..66ffe438 100644 --- a/R/datasheetRaster.R +++ b/R/datasheetRaster.R @@ -60,7 +60,7 @@ NULL #' @examples #' \dontrun{ #' # Install the helloworldSpatial package from the server -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Specify file path and name of new SsimLibrary #' myLibraryName <- file.path(tempdir(), "testlib_datasheetRaster") @@ -112,7 +112,7 @@ NULL #' #' # Filter for only rasters that fit specific criteria #' # Load the ST-Sim spatial example library -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/R/datasheetSpatRaster.R b/R/datasheetSpatRaster.R index ad85c1a8..5a9342a6 100644 --- a/R/datasheetSpatRaster.R +++ b/R/datasheetSpatRaster.R @@ -55,7 +55,7 @@ NULL #' @examples #' \dontrun{ #' # Install the helloworldSpatial package from the server -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Specify file path and name of new SsimLibrary #' myLibraryName <- file.path(tempdir(), "testlib_datasheetSpatRaster") @@ -107,7 +107,7 @@ NULL #' #' # Filter for only rasters that fit specific criteria #' # Load the ST-Sim spatial example library -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/R/deprecated.R b/R/deprecated.R index 133b3650..18240ad5 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -1,7 +1,7 @@ #' Add module #' #' `r lifecycle::badge("deprecated")` -#' Please use \code{\link{addPackage}} instead. +#' Please use \code{\link{installPackage}} instead. #' #' @param filename character string or vector of these. The path to an .ssimpkg #' file on disk, or a vector of filepaths. @@ -11,14 +11,14 @@ #' #' @export addModule <- function(filename, session = NULL) { - lifecycle::deprecate_warn("1.2.11", "addModule()", "addPackage()") - addPackage(filename, session) + lifecycle::deprecate_warn("1.2.11", "addModule()", "installPackage()") + installPackage(filename, session) } #' Adds a package to SyncroSim #' #' `r lifecycle::badge("deprecated")` -#' Please use \code{\link{addPackage}} instead. +#' Please use \code{\link{installPackage}} instead. #' #' @param filename character string. The path to a SyncroSim package file #' @param session \code{\link{Session}} object @@ -26,9 +26,9 @@ addModule <- function(filename, session = NULL) { #' @keywords internal #' #' @export -addPackageFile <- function(filename, session = NULL) { - lifecycle::deprecate_warn("1.2.11", "addPackageFile()", "addPackage()") - addPackage(filename, session) +installPackageFile <- function(filename, session = NULL) { + lifecycle::deprecate_warn("1.2.11", "installPackageFile()", "installPackage()") + installPackage(filename, session) } #' Installed base packages @@ -219,4 +219,4 @@ envStepSimulation <- function() { envEndSimulation <- function() { lifecycle::deprecate_warn("1.2.11", "envEndSimulation()", "progressBar()") progressBar(type = "end") -} \ No newline at end of file +} diff --git a/R/disableAddon.R b/R/disableAddon.R index d240a2ab..a4b4bcd8 100644 --- a/R/disableAddon.R +++ b/R/disableAddon.R @@ -20,7 +20,7 @@ NULL #' @examples #' \donttest{ #' # Install "stsim" SyncroSim package -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Specify file path and name of new SsimLibrary #' myLibraryName <- file.path(tempdir(), "testlib") diff --git a/R/enableAddon.R b/R/enableAddon.R index e97ab66f..4fd35651 100644 --- a/R/enableAddon.R +++ b/R/enableAddon.R @@ -20,7 +20,7 @@ NULL #' @examples #' \donttest{ #' # Install "stsim" SyncroSim package -#' addPackage("stsim") +#' installPackage("stsim") #' #' # Specify file path and name of new SsimLibrary #' myLibraryName <- file.path(tempdir(), "testlib") diff --git a/R/addPackage.R b/R/installPackage.R similarity index 73% rename from R/addPackage.R rename to R/installPackage.R index 18ab8d69..ead51bfe 100644 --- a/R/addPackage.R +++ b/R/installPackage.R @@ -8,7 +8,7 @@ NULL #' This function installs a package to the SyncroSim \code{\link{Session}}. #' If only the package name is provided as input, the function queries the #' SyncroSim package server for the specified package. If a file path is -#' provided as input, the function adds a package to SyncroSim from a local +#' provided as input, the function installs a package to SyncroSim from a local #' package file (ends in ".ssimpkg"). The list of SyncroSim packages can be #' found \href{https://syncrosim.com/packages/}{here}. #' @@ -26,29 +26,29 @@ NULL #' # Create a new SyncroSim Session #' mySession <- session() #' -#' # Add package from the package server -#' addPackage("stsim", session = mySession) +#' # Install package from the package server +#' installPackage("stsim", session = mySession) #' -#' # Add package using a local file path -#' addPackage("c:/path/to/stsim.ssimpkg") +#' # Install package using a local file path +#' installPackage("c:/path/to/stsim.ssimpkg") #' } #' #' @export -setGeneric("addPackage", function(name, session = NULL) standardGeneric("addPackage")) +setGeneric("installPackage", function(name, session = NULL) standardGeneric("installPackage")) -#' @rdname addPackage -setMethod("addPackage", signature(session = "character"), function(name, session) { +#' @rdname installPackage +setMethod("installPackage", signature(session = "character"), function(name, session) { return(SyncroSimNotFound(session)) }) -#' @rdname addPackage -setMethod("addPackage", signature(session = "missingOrNULL"), function(name, session) { +#' @rdname installPackage +setMethod("installPackage", signature(session = "missingOrNULL"), function(name, session) { session <- .session() - return(addPackage(name, session)) + return(installPackage(name, session)) }) -#' @rdname addPackage -setMethod("addPackage", signature(session = "Session"), function(name, session) { +#' @rdname installPackage +setMethod("installPackage", signature(session = "Session"), function(name, session) { success <- FALSE if (is.null(name)) { diff --git a/R/package.R b/R/package.R index 3e4b6988..d083f509 100644 --- a/R/package.R +++ b/R/package.R @@ -44,7 +44,7 @@ NULL #' package(myLibrary) #' #' # Check the templates available for an installed package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' package(listTemplates = "helloworldSpatial") #' } #' diff --git a/R/parentId.R b/R/parentId.R index 37436ff7..b780e95f 100644 --- a/R/parentId.R +++ b/R/parentId.R @@ -18,7 +18,7 @@ NULL #' @examples #' \donttest{ #' # Install helloworldSpatial SyncroSim package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_parentId") diff --git a/R/run.R b/R/run.R index 7a525166..6ace7472 100644 --- a/R/run.R +++ b/R/run.R @@ -36,7 +36,7 @@ NULL #' @examples #' \dontrun{ #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib") diff --git a/R/runLog.R b/R/runLog.R index 8f10d8d6..67713d4e 100644 --- a/R/runLog.R +++ b/R/runLog.R @@ -15,7 +15,7 @@ NULL #' @examples #' \dontrun{ #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib") diff --git a/R/saveDatasheet.R b/R/saveDatasheet.R index cf02c414..f74fe54b 100644 --- a/R/saveDatasheet.R +++ b/R/saveDatasheet.R @@ -66,7 +66,7 @@ NULL #' @examples #' \donttest{ #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_saveDatasheet") diff --git a/R/sqlStatement.R b/R/sqlStatement.R index c618b721..7d38afca 100644 --- a/R/sqlStatement.R +++ b/R/sqlStatement.R @@ -42,7 +42,7 @@ NULL #' #' # The SQL statement can then be used in the datasheet function #' # Install helloworldSpatial package -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' #' # Set the file path and name of the new SsimLibrary #' myLibraryName <- file.path(tempdir(),"testlib_sqlStatement") diff --git a/R/ssimLibrary.R b/R/ssimLibrary.R index 0e3f1cf5..36fa070e 100644 --- a/R/ssimLibrary.R +++ b/R/ssimLibrary.R @@ -35,7 +35,7 @@ setMethod( packageOptions <- package(session, installed = "BASE") if (nrow(packageOptions) == 0) { - stop("No base packages are installed. Use addPackage() to install a package.") + stop("No base packages are installed. Use installPackage() to install a package.") } if (identical(basename(name), name)) { @@ -154,7 +154,7 @@ setMethod( tt <- command(args, session) if (grepl("Could not find package", tt[[1]])) { - stop(paste(tt[[1]], "Use addPackage() to install this package.")) + stop(paste(tt[[1]], "Use installPackage() to install this package.")) } if (grepl("The library has unapplied updates", tt[[1]])) { @@ -309,8 +309,8 @@ setMethod(".ssimLibrary", signature(name = "SsimObject"), function(name, package #' @examples #' \donttest{ #' # Make sure packages are installed -#' addPackage("stsim") -#' addPackage("stsimsf") +#' installPackage("stsim") +#' installPackage("stsimsf") #' #' # Create or open a SsimLibrary using the default Session #' myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib")) @@ -330,7 +330,7 @@ setMethod(".ssimLibrary", signature(name = "SsimObject"), function(name, package #' addon = "stsimsf") #' #' # Create SsimLibrary from template -#' addPackage("helloworldSpatial") +#' installPackage("helloworldSpatial") #' mySession <- session() #' myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), #' session = mySession, diff --git a/docs/articles/a01_rsyncrosim_vignette_basic.html b/docs/articles/a01_rsyncrosim_vignette_basic.html index 156f6fa9..46350f51 100644 --- a/docs/articles/a01_rsyncrosim_vignette_basic.html +++ b/docs/articles/a01_rsyncrosim_vignette_basic.html @@ -225,7 +225,7 @@

Connecting R to SyncroSim using
## [1] "2.4.36"
-

Installing SyncroSim packages using addPackage() +

Installing SyncroSim packages using installPackage()

Finally, check if the helloworldTime @@ -266,22 +266,22 @@

Installing SyncroSim pac ## 5 1.1.1 N/A ## 6 2.3.3 N/A

Install helloworldTime using the rynscrosim -function addPackage(). This function takes a package name +function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldTime
-addPackage("helloworldTime")
+installPackage("helloworldTime")

## Package <helloworldTime> installed

To install the package from a .ssimpkg file on your local computer rather than installing directly from the server, you can -use the addPackage() function with the +use the installPackage() function with the filepath argument set to TRUE. Instead of using the package name as the argument, the file path to the .ssimpkg is used.

 # Install helloworldTime using file path to ssimpkg file
-addPackage("path/to/helloworldTime.ssimpkg")
+installPackage("path/to/helloworldTime.ssimpkg")

Now helloworldTime should be included in the package list:

diff --git a/docs/articles/a02_rsyncrosim_vignette_uncertainty.html b/docs/articles/a02_rsyncrosim_vignette_uncertainty.html
index df6c9da9..0b27c9df 100644
--- a/docs/articles/a02_rsyncrosim_vignette_uncertainty.html
+++ b/docs/articles/a02_rsyncrosim_vignette_uncertainty.html
@@ -198,15 +198,15 @@ 

Connecting R to SyncroSim using
## [1] "2.4.36"

-

Installing SyncroSim packages using addPackage() +

Installing SyncroSim packages using installPackage()

Install helloworldUncertainty using the -rynscrosim function addPackage(). This +rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldUncertainty
-addPackage("helloworldUncertainty")
+installPackage("helloworldUncertainty")
## Package <helloworldUncertainty> installed

helloworldUncertainty should now be included in the package list when we call the package() function:

diff --git a/docs/articles/a03_rsyncrosim_vignette_pipelines.html b/docs/articles/a03_rsyncrosim_vignette_pipelines.html index 33f278b4..7e5d6b77 100644 --- a/docs/articles/a03_rsyncrosim_vignette_pipelines.html +++ b/docs/articles/a03_rsyncrosim_vignette_pipelines.html @@ -203,15 +203,15 @@

Connecting R to SyncroSim using
## [1] "2.4.36"
-

Installing SyncroSim packages using addPackage() +

Installing SyncroSim packages using installPackage()

Install helloworldPipeline using the -rynscrosim function addPackage(). This +rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldPipeline
-addPackage("helloworldPipeline")
+installPackage("helloworldPipeline")
## Package <helloworldPipeline> installed

helloworldPipeline should now be included in the package list returned by the package() function in diff --git a/docs/articles/a04_rsyncrosim_vignette_spatial.html b/docs/articles/a04_rsyncrosim_vignette_spatial.html index 3a905569..cba04f6a 100644 --- a/docs/articles/a04_rsyncrosim_vignette_spatial.html +++ b/docs/articles/a04_rsyncrosim_vignette_spatial.html @@ -203,15 +203,15 @@

Connecting R to SyncroSim using
## [1] "2.4.27"
-

Installing SyncroSim packages using addPackage() +

Installing SyncroSim packages using installPackage()

Install helloworldSpatial using the -rynscrosim function addPackage(). This +rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldSpatial
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
## Package <helloworldSpatial> installed

helloworldSpatial should now be included in the package list returned by the package() function in diff --git a/docs/articles/a05_rsyncrosim_stsim_vignette.html b/docs/articles/a05_rsyncrosim_stsim_vignette.html index 9dcdcb0a..e1a41bed 100644 --- a/docs/articles/a05_rsyncrosim_stsim_vignette.html +++ b/docs/articles/a05_rsyncrosim_stsim_vignette.html @@ -200,15 +200,15 @@

Connecting R to SyncroSim using
## [1] "2.4.27"
-

Installing SyncroSim packages using addPackage() +

Installing SyncroSim packages using installPackage()

Install stsim using the rsyncrosim function -addPackage(). This function takes a package name as input +installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install stsim
-addPackage("stsim")
+installPackage("stsim")
## Package <stsim> installed

stsim should now be included in the package list returned by the package() function in diff --git a/docs/articles/rsyncrosim_stsim_vignette.html b/docs/articles/rsyncrosim_stsim_vignette.html index 4cc47a04..18f25d04 100644 --- a/docs/articles/rsyncrosim_stsim_vignette.html +++ b/docs/articles/rsyncrosim_stsim_vignette.html @@ -161,7 +161,7 @@

mySession # Displays the Session object

The next step is to create a SyncroSim Library. A Library is a file (with .ssim extension) that stores all of your model inputs and outputs. The format of each SyncroSim Library is unique to the SyncroSim Package with which it is associated. We use the ssimLibrary function to create a new SsimLibrary object in R that is connected (through your Session) to a SyncroSim Library file. Note that an existing Library file can be later opened again by setting overwrite=FALSE for the ssimLibrary function.

-addPackage("stsim", mySession)   # Get stsim package from SyncroSim online server (only the first time)
+installPackage("stsim", mySession)   # Get stsim package from SyncroSim online server (only the first time)
 myLibrary <- ssimLibrary(name = "demoLibrary.ssim", session = mySession, overwrite = TRUE)

Each SyncroSim Library contains one or more SyncroSim Projects, each represented by a Project object in R. Projects typically store model inputs that are common to all your scenarios. In most situations you will need only a single Project for your Library; by default each new Library starts with a single Project named “Definitions” (with a unique projectId= 1). The project function is used to both create and retrieve Projects.

diff --git a/docs/articles/rsyncrosim_vignette_basic.html b/docs/articles/rsyncrosim_vignette_basic.html
index 3ff94c67..4b220ab4 100644
--- a/docs/articles/rsyncrosim_vignette_basic.html
+++ b/docs/articles/rsyncrosim_vignette_basic.html
@@ -156,9 +156,9 @@ 

# Load R package for working with SyncroSim library(rsyncrosim)

-
+

-Installing SyncroSim packages using addPackage() +Installing SyncroSim packages using installPackage()

Check if the helloworldTime package is already installed. Use the package() function from rsyncrosim to first get a list of all currently installed packages in SyncroSim.

@@ -191,15 +191,15 @@ 

## 4 1.0.0 ## 5 1.0.0 ## 6 1.0.0

-

Install helloworldTime using the rynscrosim function addPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

+

Install helloworldTime using the rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldTime
-addPackage("helloworldTime")
+installPackage("helloworldTime")
## Package <helloworldTime> installed
-

To install the package from a .ssimpkg file on your local computer rather than installing directly from the server, you can use the addPackage() function with the filepath argument set to TRUE. Instead of using the package name as the argument, the file path to the .ssimpkg is used.

+

To install the package from a .ssimpkg file on your local computer rather than installing directly from the server, you can use the installPackage() function with the filepath argument set to TRUE. Instead of using the package name as the argument, the file path to the .ssimpkg is used.

 # Install helloworldTime using file path to ssimpkg file
-addPackage("path/to/helloworldTime.ssimpkg")
+installPackage("path/to/helloworldTime.ssimpkg")

Now helloworldTime should be included in the package list:

 # Get list of installed packages
diff --git a/docs/articles/rsyncrosim_vignette_pipelines.html b/docs/articles/rsyncrosim_vignette_pipelines.html
index c90db145..7f39c348 100644
--- a/docs/articles/rsyncrosim_vignette_pipelines.html
+++ b/docs/articles/rsyncrosim_vignette_pipelines.html
@@ -144,14 +144,14 @@ 

# Load R package for working with SyncroSim library(rsyncrosim)

-
+

-Installing SyncroSim packages using addPackage() +Installing SyncroSim packages using installPackage()

-

Install helloworldPipeline using the rynscrosim function addPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

+

Install helloworldPipeline using the rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldPipeline
-addPackage("helloworldPipeline")
+installPackage("helloworldPipeline")
## Package <helloworldPipeline> installed

helloworldPipeline should now be included in the package list returned by the package() function in rsyncrosim:

diff --git a/docs/articles/rsyncrosim_vignette_spatial.html b/docs/articles/rsyncrosim_vignette_spatial.html
index b3426d2f..d7fc2281 100644
--- a/docs/articles/rsyncrosim_vignette_spatial.html
+++ b/docs/articles/rsyncrosim_vignette_spatial.html
@@ -145,14 +145,14 @@ 

library(raster) # package for working with raster data

## Loading required package: sp
-
+

-Installing SyncroSim packages using addPackage() +Installing SyncroSim packages using installPackage()

-

Install helloworldSpatial using the rynscrosim function addPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

+

Install helloworldSpatial using the rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldSpatial
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
## Package <helloworldSpatial> installed

helloworldSpatial should now be included in the package list returned by the package() function in rsyncrosim:

diff --git a/docs/articles/rsyncrosim_vignette_uncertainty.html b/docs/articles/rsyncrosim_vignette_uncertainty.html
index 200fc028..35714486 100644
--- a/docs/articles/rsyncrosim_vignette_uncertainty.html
+++ b/docs/articles/rsyncrosim_vignette_uncertainty.html
@@ -144,14 +144,14 @@ 

# Load R package for working with SyncroSim library(rsyncrosim)

-
+

-Installing SyncroSim packages using addPackage() +Installing SyncroSim packages using installPackage()

-

Install helloworldUncertainty using the rynscrosim function addPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

+

Install helloworldUncertainty using the rynscrosim function installPackage(). This function takes a package name as input and then queries the SyncroSim package server for the specified package.

 # Install helloworldUncertainty
-addPackage("helloworldUncertainty")
+installPackage("helloworldUncertainty")
## Package <helloworldUncertainty> installed

helloworldUncertainty should now be included in the package list when we call the package() function:

diff --git a/docs/reference/addBreakpoint.html b/docs/reference/addBreakpoint.html
index 96b04c6f..c906f748 100644
--- a/docs/reference/addBreakpoint.html
+++ b/docs/reference/addBreakpoint.html
@@ -135,7 +135,7 @@ 

Examples

} # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/docs/reference/addModule.html b/docs/reference/addModule.html index 56e3ae73..c3c6eb81 100644 --- a/docs/reference/addModule.html +++ b/docs/reference/addModule.html @@ -1,6 +1,6 @@ Add module — addModule • rsyncrosim @@ -76,7 +76,7 @@

Add module

[Deprecated] -Please use addPackage instead.

+Please use installPackage instead.

diff --git a/docs/reference/addPackage.html b/docs/reference/addPackage.html index 352568f5..8b6a2cf4 100644 --- a/docs/reference/addPackage.html +++ b/docs/reference/addPackage.html @@ -1,5 +1,5 @@ -Adds package to SyncroSim Installation — addPackage • rsyncrosim
@@ -88,16 +88,16 @@

Adds package to SyncroSim Installation

-
addPackage(name, session = NULL)
+    
installPackage(name, session = NULL)
 
 # S4 method for ANY,character
-addPackage(name, session = NULL)
+installPackage(name, session = NULL)
 
 # S4 method for ANY,missingOrNULL
-addPackage(name, session = NULL)
+installPackage(name, session = NULL)
 
 # S4 method for ANY,Session
-addPackage(name, session = NULL)
+installPackage(name, session = NULL)
@@ -127,10 +127,10 @@

Examples

mySession <- session() # Add package from the package server -addPackage("stsim", session = mySession) +installPackage("stsim", session = mySession) # Add package using a local file path -addPackage("c:/path/to/stsim.ssimpkg") +installPackage("c:/path/to/stsim.ssimpkg") }
diff --git a/docs/reference/addPackageFile.html b/docs/reference/addPackageFile.html index 4ca50245..b0bec3ee 100644 --- a/docs/reference/addPackageFile.html +++ b/docs/reference/addPackageFile.html @@ -1,6 +1,6 @@ -Adds a package to SyncroSim — addPackageFile • rsyncrosimAdds a package to SyncroSim — installPackageFile • rsyncrosim @@ -71,16 +71,16 @@

[Deprecated] -Please use addPackage instead.

+Please use installPackage instead.

-
addPackageFile(filename, session = NULL)
+
installPackageFile(filename, session = NULL)
diff --git a/docs/reference/addon.html b/docs/reference/addon.html index 83bc8eaf..c7e145cd 100644 --- a/docs/reference/addon.html +++ b/docs/reference/addon.html @@ -127,7 +127,7 @@

Value

Examples

# \donttest{
 # Install the base package "stsim"
-addPackage("stsim")
+installPackage("stsim")
 #> Package <stsim> is already installed
 
 # Set the file path and name of the new SsimLibrary
diff --git a/docs/reference/breakpoint.html b/docs/reference/breakpoint.html
index b34ba463..08ae743d 100644
--- a/docs/reference/breakpoint.html
+++ b/docs/reference/breakpoint.html
@@ -106,7 +106,7 @@ 

Examples

} # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/docs/reference/command.html b/docs/reference/command.html index 26bdc3b2..fca9f5c8 100644 --- a/docs/reference/command.html +++ b/docs/reference/command.html @@ -135,7 +135,7 @@

Details

Examples

if (FALSE) {
 # Install "stsim" if not already installed
-addPackage("stsim")
+installPackage("stsim")
 
 # Set the file path and name of the new SsimLibrary
 myLibraryName <- file.path(tempdir(),"testlib.ssim")
diff --git a/docs/reference/datasheet.html b/docs/reference/datasheet.html
index 3eef1f8c..a1c3bed7 100644
--- a/docs/reference/datasheet.html
+++ b/docs/reference/datasheet.html
@@ -277,7 +277,7 @@ 

Details

Examples

# \donttest{
 # Install helloworldSpatial package from package server
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 #> Package <helloworldSpatial> is already installed
 
 # Set the file path and name of the new SsimLibrary
diff --git a/docs/reference/datasheetRaster.html b/docs/reference/datasheetRaster.html
index f8fcd2cb..f8e90bb4 100644
--- a/docs/reference/datasheetRaster.html
+++ b/docs/reference/datasheetRaster.html
@@ -241,7 +241,7 @@ 

Details

Examples

if (FALSE) {
 # Install the helloworldSpatial package from the server
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 
 # Specify file path and name of new SsimLibrary
 myLibraryName <- file.path(tempdir(), "testlib_datasheetRaster")
@@ -292,7 +292,7 @@ 

Examples

# Filter for only rasters that fit specific criteria # Load the ST-Sim spatial example library -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/docs/reference/datasheetSpatRaster.html b/docs/reference/datasheetSpatRaster.html index e4b39b52..b756058b 100644 --- a/docs/reference/datasheetSpatRaster.html +++ b/docs/reference/datasheetSpatRaster.html @@ -239,7 +239,7 @@

Details

Examples

if (FALSE) {
 # Install the helloworldSpatial package from the server
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 
 # Specify file path and name of new SsimLibrary
 myLibraryName <- file.path(tempdir(), "testlib_datasheetSpatRaster")
@@ -291,7 +291,7 @@ 

Examples

# Filter for only rasters that fit specific criteria # Load the ST-Sim spatial example library -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/docs/reference/deleteBreakpoint.html b/docs/reference/deleteBreakpoint.html index 89f75b6e..884b9c07 100644 --- a/docs/reference/deleteBreakpoint.html +++ b/docs/reference/deleteBreakpoint.html @@ -121,7 +121,7 @@

Examples

} # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/docs/reference/disableAddon.html b/docs/reference/disableAddon.html index 2898e40b..9d29edc7 100644 --- a/docs/reference/disableAddon.html +++ b/docs/reference/disableAddon.html @@ -113,7 +113,7 @@

See also

Examples

# \donttest{
 # Install "stsim" SyncroSim package
-addPackage("stsim")
+installPackage("stsim")
 #> Package <stsim> is already installed
 
 # Specify file path and name of new SsimLibrary
diff --git a/docs/reference/enableAddon.html b/docs/reference/enableAddon.html
index f0c1bce3..a9433f0e 100644
--- a/docs/reference/enableAddon.html
+++ b/docs/reference/enableAddon.html
@@ -113,7 +113,7 @@ 

See also

Examples

# \donttest{
 # Install "stsim" SyncroSim package
-addPackage("stsim")
+installPackage("stsim")
 #> Package <stsim> is already installed
 
 # Specify file path and name of new SsimLibrary
diff --git a/docs/reference/index.html b/docs/reference/index.html
index e5c0d8c7..72d6177e 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -84,7 +84,7 @@ 

All functions

Addon(s) installed in SsimLibrary or Session

-

addPackage()

+

installPackage()

Adds package to SyncroSim Installation

diff --git a/docs/reference/package.html b/docs/reference/package.html index 5ffe78df..cded6c59 100644 --- a/docs/reference/package.html +++ b/docs/reference/package.html @@ -394,7 +394,7 @@

Examples

#> 1 stsim The ST-Sim state-and-transition simulation model 3.3.14 # Check the templates available for an installed package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") #> Package <helloworldSpatial> is already installed package(listTemplates = "helloworldSpatial") #> name displayName installed diff --git a/docs/reference/parentId.html b/docs/reference/parentId.html index ce394ab8..50b2e0ef 100644 --- a/docs/reference/parentId.html +++ b/docs/reference/parentId.html @@ -113,7 +113,7 @@

Value

Examples

# \donttest{
 # Install helloworldSpatial SyncroSim package
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 #> Package <helloworldSpatial> is already installed
 
 # Set the file path and name of the new SsimLibrary
diff --git a/docs/reference/run.html b/docs/reference/run.html
index e936f61a..313916e0 100644
--- a/docs/reference/run.html
+++ b/docs/reference/run.html
@@ -182,7 +182,7 @@ 

Details

Examples

if (FALSE) {
 # Install helloworldSpatial package
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 
 # Set the file path and name of the new SsimLibrary
 myLibraryName <- file.path(tempdir(),"testlib")
diff --git a/docs/reference/runLog.html b/docs/reference/runLog.html
index 13b78cb4..0e65bd70 100644
--- a/docs/reference/runLog.html
+++ b/docs/reference/runLog.html
@@ -104,7 +104,7 @@ 

Value

Examples

if (FALSE) {
 # Install helloworldSpatial package
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 
 # Set the file path and name of the new SsimLibrary
 myLibraryName <- file.path(tempdir(),"testlib")
diff --git a/docs/reference/saveDatasheet.html b/docs/reference/saveDatasheet.html
index c2eb8d55..8b0c7e46 100644
--- a/docs/reference/saveDatasheet.html
+++ b/docs/reference/saveDatasheet.html
@@ -212,7 +212,7 @@ 

Details

Examples

# \donttest{
 # Install helloworldSpatial package
-addPackage("helloworldSpatial")
+installPackage("helloworldSpatial")
 #> Package <helloworldSpatial> is already installed
 
 # Set the file path and name of the new SsimLibrary
diff --git a/docs/reference/sqlStatement.html b/docs/reference/sqlStatement.html
index 5e723b94..fd186b5b 100644
--- a/docs/reference/sqlStatement.html
+++ b/docs/reference/sqlStatement.html
@@ -151,7 +151,7 @@ 

Examples

# The SQL statement can then be used in the datasheet function # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") #> Package <helloworldSpatial> is already installed # Set the file path and name of the new SsimLibrary diff --git a/docs/reference/ssimLibrary.html b/docs/reference/ssimLibrary.html index 9e853e81..6d1480c1 100644 --- a/docs/reference/ssimLibrary.html +++ b/docs/reference/ssimLibrary.html @@ -196,9 +196,9 @@

Details

Examples

# \donttest{
 # Make sure packages are installed
-addPackage("stsim")
+installPackage("stsim")
 #> Package <stsim> is already installed
-addPackage("stsimsf")
+installPackage("stsimsf")
 #> Package <stsimsf> is already installed
 
 # Create or open a SsimLibrary using the default Session
@@ -224,7 +224,7 @@ 

Examples

addon = "stsimsf") # Create SsimLibrary from template -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") #> Package <helloworldSpatial> is already installed mySession <- session() myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 183e1493..84d74514 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -67,10 +67,10 @@ https://syncrosim.github.io/rsyncrosim/reference/addon.html - https://syncrosim.github.io/rsyncrosim/reference/addPackage.html + https://syncrosim.github.io/rsyncrosim/reference/installPackage.html - https://syncrosim.github.io/rsyncrosim/reference/addPackageFile.html + https://syncrosim.github.io/rsyncrosim/reference/installPackageFile.html https://syncrosim.github.io/rsyncrosim/reference/addRow.html diff --git a/man/addBreakpoint.Rd b/man/addBreakpoint.Rd index 36c0b9a1..3ee4a5fb 100644 --- a/man/addBreakpoint.Rd +++ b/man/addBreakpoint.Rd @@ -43,7 +43,7 @@ callbackFunction <- function(x, iteration, timestep) { } # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/addModule.Rd b/man/addModule.Rd index e9c516ef..c8ef25ac 100644 --- a/man/addModule.Rd +++ b/man/addModule.Rd @@ -14,6 +14,6 @@ file on disk, or a vector of filepaths.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} -Please use \code{\link{addPackage}} instead. +Please use \code{\link{installPackage}} instead. } \keyword{internal} diff --git a/man/addPackage.Rd b/man/addPackage.Rd index 2bf8f6cb..98cec1a1 100644 --- a/man/addPackage.Rd +++ b/man/addPackage.Rd @@ -1,19 +1,19 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/addPackage.R -\name{addPackage} -\alias{addPackage} -\alias{addPackage,ANY,character-method} -\alias{addPackage,ANY,missingOrNULL-method} -\alias{addPackage,ANY,Session-method} +% Please edit documentation in R/installPackage.R +\name{installPackage} +\alias{installPackage} +\alias{installPackage,ANY,character-method} +\alias{installPackage,ANY,missingOrNULL-method} +\alias{installPackage,ANY,Session-method} \title{Adds package to SyncroSim Installation} \usage{ -addPackage(name, session = NULL) +installPackage(name, session = NULL) -\S4method{addPackage}{ANY,character}(name, session = NULL) +\S4method{installPackage}{ANY,character}(name, session = NULL) -\S4method{addPackage}{ANY,missingOrNULL}(name, session = NULL) +\S4method{installPackage}{ANY,missingOrNULL}(name, session = NULL) -\S4method{addPackage}{ANY,Session}(name, session = NULL) +\S4method{installPackage}{ANY,Session}(name, session = NULL) } \arguments{ \item{name}{character string. The name or file path of the package to @@ -40,10 +40,10 @@ found \href{https://syncrosim.com/packages/}{here}. mySession <- session() # Add package from the package server -addPackage("stsim", session = mySession) +installPackage("stsim", session = mySession) # Add package using a local file path -addPackage("c:/path/to/stsim.ssimpkg") +installPackage("c:/path/to/stsim.ssimpkg") } } diff --git a/man/addPackageFile.Rd b/man/addPackageFile.Rd index 0e52ed05..d2f14b29 100644 --- a/man/addPackageFile.Rd +++ b/man/addPackageFile.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/deprecated.R -\name{addPackageFile} -\alias{addPackageFile} +\name{installPackageFile} +\alias{installPackageFile} \title{Adds a package to SyncroSim} \usage{ -addPackageFile(filename, session = NULL) +installPackageFile(filename, session = NULL) } \arguments{ \item{filename}{character string. The path to a SyncroSim package file} @@ -13,6 +13,6 @@ addPackageFile(filename, session = NULL) } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} -Please use \code{\link{addPackage}} instead. +Please use \code{\link{installPackage}} instead. } \keyword{internal} diff --git a/man/addon.Rd b/man/addon.Rd index eb60d115..0dcc64a2 100644 --- a/man/addon.Rd +++ b/man/addon.Rd @@ -40,7 +40,7 @@ More information on addons can be found in the \examples{ \donttest{ # Install the base package "stsim" -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/breakpoint.Rd b/man/breakpoint.Rd index ca65f2bc..1ce31738 100644 --- a/man/breakpoint.Rd +++ b/man/breakpoint.Rd @@ -26,7 +26,7 @@ callbackFunction <- function(x, iteration, timestep) { } # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/command.Rd b/man/command.Rd index 1ead4004..e9fb6656 100644 --- a/man/command.Rd +++ b/man/command.Rd @@ -48,7 +48,7 @@ Example args, and the resulting character string passed to the SyncroSim console \examples{ \dontrun{ # Install "stsim" if not already installed -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib.ssim") diff --git a/man/datasheet.Rd b/man/datasheet.Rd index 5fca70ea..39a21869 100644 --- a/man/datasheet.Rd +++ b/man/datasheet.Rd @@ -173,7 +173,7 @@ by \code{name} and \code{id}} \examples{ \dontrun{ # Install helloworldSpatial package from package server -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_datasheet") diff --git a/man/datasheetRaster.Rd b/man/datasheetRaster.Rd index 9f6c9be0..f5e01b7a 100644 --- a/man/datasheetRaster.Rd +++ b/man/datasheetRaster.Rd @@ -145,7 +145,7 @@ For Datasheets containing Filename this is: \examples{ \dontrun{ # Install the helloworldSpatial package from the server -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Specify file path and name of new SsimLibrary myLibraryName <- file.path(tempdir(), "testlib_datasheetRaster") @@ -197,7 +197,7 @@ resultRaster <- datasheetRaster(resultScenario, # Filter for only rasters that fit specific criteria # Load the ST-Sim spatial example library -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/man/datasheetSpatRaster.Rd b/man/datasheetSpatRaster.Rd index e73db87a..63af5904 100644 --- a/man/datasheetSpatRaster.Rd +++ b/man/datasheetSpatRaster.Rd @@ -140,7 +140,7 @@ For Datasheets containing Filename this is: \examples{ \dontrun{ # Install the helloworldSpatial package from the server -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Specify file path and name of new SsimLibrary myLibraryName <- file.path(tempdir(), "testlib_datasheetSpatRaster") @@ -192,7 +192,7 @@ resultRaster <- datasheetSpatRaster(resultScenario, # Filter for only rasters that fit specific criteria # Load the ST-Sim spatial example library -addPackage("stsim") +installPackage("stsim") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_stsim_datasheet") diff --git a/man/deleteBreakpoint.Rd b/man/deleteBreakpoint.Rd index c037ca59..2f4fc194 100644 --- a/man/deleteBreakpoint.Rd +++ b/man/deleteBreakpoint.Rd @@ -33,7 +33,7 @@ callbackFunction <- function(x, iteration, timestep) { } # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set SsimLibrary name myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/disableAddon.Rd b/man/disableAddon.Rd index 17a0b8f8..1a295b0d 100644 --- a/man/disableAddon.Rd +++ b/man/disableAddon.Rd @@ -27,7 +27,7 @@ Disable \code{\link{addon}} package(s) of a \code{\link{SsimLibrary}}. \examples{ \donttest{ # Install "stsim" SyncroSim package -addPackage("stsim") +installPackage("stsim") # Specify file path and name of new SsimLibrary myLibraryName <- file.path(tempdir(), "testlib") diff --git a/man/enableAddon.Rd b/man/enableAddon.Rd index 507e1746..f59b01a7 100644 --- a/man/enableAddon.Rd +++ b/man/enableAddon.Rd @@ -27,7 +27,7 @@ Enable \code{\link{addon}} package(s) of a \code{\link{SsimLibrary}}. \examples{ \donttest{ # Install "stsim" SyncroSim package -addPackage("stsim") +installPackage("stsim") # Specify file path and name of new SsimLibrary myLibraryName <- file.path(tempdir(), "testlib") diff --git a/man/package.Rd b/man/package.Rd index cec85714..feee6ab5 100644 --- a/man/package.Rd +++ b/man/package.Rd @@ -61,7 +61,7 @@ package(installed = FALSE) package(myLibrary) # Check the templates available for an installed package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") package(listTemplates = "helloworldSpatial") } diff --git a/man/parentId.Rd b/man/parentId.Rd index c58d06c7..e6ba6e68 100644 --- a/man/parentId.Rd +++ b/man/parentId.Rd @@ -30,7 +30,7 @@ Folder. \examples{ \donttest{ # Install helloworldSpatial SyncroSim package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_parentId") diff --git a/man/run.Rd b/man/run.Rd index 324fa0ce..56421e9b 100644 --- a/man/run.Rd +++ b/man/run.Rd @@ -89,7 +89,7 @@ Note that breakpoints are ignored unless the SsimObject is a single Scenario. \examples{ \dontrun{ # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/runLog.Rd b/man/runLog.Rd index 5189ed14..5fc88b94 100644 --- a/man/runLog.Rd +++ b/man/runLog.Rd @@ -24,7 +24,7 @@ Retrieves the run log of a result Scenario. \examples{ \dontrun{ # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib") diff --git a/man/saveDatasheet.Rd b/man/saveDatasheet.Rd index 6d4c03f3..9b34173e 100644 --- a/man/saveDatasheet.Rd +++ b/man/saveDatasheet.Rd @@ -117,7 +117,7 @@ source and has a Project scope. In this case the data will be MERGED. \examples{ \donttest{ # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_saveDatasheet") diff --git a/man/sqlStatement.Rd b/man/sqlStatement.Rd index 3b13c5b6..06ebaf0e 100644 --- a/man/sqlStatement.Rd +++ b/man/sqlStatement.Rd @@ -53,7 +53,7 @@ mySQL # The SQL statement can then be used in the datasheet function # Install helloworldSpatial package -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") # Set the file path and name of the new SsimLibrary myLibraryName <- file.path(tempdir(),"testlib_sqlStatement") diff --git a/man/ssimLibrary.Rd b/man/ssimLibrary.Rd index b93a0ec5..ea7cdbba 100644 --- a/man/ssimLibrary.Rd +++ b/man/ssimLibrary.Rd @@ -99,8 +99,8 @@ of package.} \examples{ \donttest{ # Make sure packages are installed -addPackage("stsim") -addPackage("stsimsf") +installPackage("stsim") +installPackage("stsimsf") # Create or open a SsimLibrary using the default Session myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib")) @@ -120,7 +120,7 @@ myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), addon = "stsimsf") # Create SsimLibrary from template -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") mySession <- session() myLibrary <- ssimLibrary(name = file.path(tempdir(), "mylib"), session = mySession, diff --git a/tests/testthat/test-unit.R b/tests/testthat/test-unit.R index 24f9a2b2..9f6b59e4 100644 --- a/tests/testthat/test-unit.R +++ b/tests/testthat/test-unit.R @@ -7,8 +7,8 @@ dir.create(temp_dir) setwd(temp_dir) mySsim <- session() -addPackage(session = mySsim, name = "stsimsf") -addPackage(session = mySsim, name = "helloworld") +installPackage(session = mySsim, name = "stsimsf") +installPackage(session = mySsim, name = "helloworld") test_that("Tests of Session - assumes SyncroSim is installed", { skip_on_cran() @@ -289,4 +289,4 @@ test_that("Tests of datasheet - assumes SyncroSim is installed", { }) setwd(old_dir) -unlink(temp_dir, recursive = TRUE) \ No newline at end of file +unlink(temp_dir, recursive = TRUE) diff --git a/using-conda-with-rsyncrosim.Rmd b/using-conda-with-rsyncrosim.Rmd index 4a0e5bda..2b365274 100644 --- a/using-conda-with-rsyncrosim.Rmd +++ b/using-conda-with-rsyncrosim.Rmd @@ -22,7 +22,7 @@ library(rsyncrosim) Install a Package that uses Conda environments ```{r} -addPackage("c:/Users/birch/OneDrive/Desktop/wisdm.ssimpkg") +installPackage("c:/Users/birch/OneDrive/Desktop/wisdm.ssimpkg") ``` Start an rsyncrosim Session and set the Conda Filepath diff --git a/vignettes/a01_rsyncrosim_vignette_basic.Rmd b/vignettes/a01_rsyncrosim_vignette_basic.Rmd index bccb1ab0..e2c3035e 100644 --- a/vignettes/a01_rsyncrosim_vignette_basic.Rmd +++ b/vignettes/a01_rsyncrosim_vignette_basic.Rmd @@ -81,7 +81,7 @@ You can check to see which version of SyncroSim your R script is connected to by version(mySession) ``` -### Installing SyncroSim packages using `addPackage()` +### Installing SyncroSim packages using `installPackage()` Finally, check if the helloworldTime package is already installed. Use the `package()` function from `rsyncrosim` to first get a list of all currently installed packages in SyncroSim. @@ -105,7 +105,7 @@ availablePackages <- package(installed = FALSE) head(availablePackages) ``` -Install `helloworldTime` using the `rynscrosim` function `addPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. +Install `helloworldTime` using the `rynscrosim` function `installPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. ```{r remove package from server run, warning=FALSE, include=FALSE} installedPackages <- package() @@ -116,15 +116,15 @@ if (is.element( ```{r add package from server, warning = FALSE} # Install helloworldTime -addPackage("helloworldTime") +installPackage("helloworldTime") ``` -To install the package from a `.ssimpkg` file on your local computer rather than installing directly from the server, you can use the `addPackage()` function with the `filepath` argument set to `TRUE`. Instead of using the package name as the argument, the file path to the `.ssimpkg` is used. +To install the package from a `.ssimpkg` file on your local computer rather than installing directly from the server, you can use the `installPackage()` function with the `filepath` argument set to `TRUE`. Instead of using the package name as the argument, the file path to the `.ssimpkg` is used. ```{r add package from path not run, warning = FALSE, eval = FALSE} # Install helloworldTime using file path to ssimpkg file -addPackage("path/to/helloworldTime.ssimpkg") +installPackage("path/to/helloworldTime.ssimpkg") ``` Now `helloworldTime` should be included in the package list: diff --git a/vignettes/a02_rsyncrosim_vignette_uncertainty.Rmd b/vignettes/a02_rsyncrosim_vignette_uncertainty.Rmd index f4e5223d..b0758e18 100644 --- a/vignettes/a02_rsyncrosim_vignette_uncertainty.Rmd +++ b/vignettes/a02_rsyncrosim_vignette_uncertainty.Rmd @@ -65,9 +65,9 @@ Use the `version()` function to ensure you are using the latest version of Syncr version(mySession) ``` -### Installing SyncroSim packages using `addPackage()` +### Installing SyncroSim packages using `installPackage()` -Install `helloworldUncertainty` using the `rynscrosim` function `addPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. +Install `helloworldUncertainty` using the `rynscrosim` function `installPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. ```{r remove package from server run, warning=FALSE, include=FALSE} installedPackages <- package() @@ -78,7 +78,7 @@ if (is.element( ```{r add package from server, warning = FALSE} # Install helloworldUncertainty -addPackage("helloworldUncertainty") +installPackage("helloworldUncertainty") ``` `helloworldUncertainty` should now be included in the package list when we call the `package()` function: diff --git a/vignettes/a03_rsyncrosim_vignette_pipelines.Rmd b/vignettes/a03_rsyncrosim_vignette_pipelines.Rmd index 79832fb9..b8f0477d 100644 --- a/vignettes/a03_rsyncrosim_vignette_pipelines.Rmd +++ b/vignettes/a03_rsyncrosim_vignette_pipelines.Rmd @@ -65,9 +65,9 @@ Use the `version()` function to ensure you are using the latest version of Syncr version(mySession) ``` -### Installing SyncroSim packages using `addPackage()` +### Installing SyncroSim packages using `installPackage()` -Install `helloworldPipeline` using the `rynscrosim` function `addPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. +Install `helloworldPipeline` using the `rynscrosim` function `installPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. ```{r remove package from server run, warning=FALSE, include=FALSE} installedPackages <- package() @@ -78,7 +78,7 @@ if (is.element( ```{r add package from server, warning = FALSE} # Install helloworldPipeline -addPackage("helloworldPipeline") +installPackage("helloworldPipeline") ``` `helloworldPipeline` should now be included in the package list returned by the `package()` function in `rsyncrosim`: diff --git a/vignettes/a04_rsyncrosim_vignette_spatial.Rmd b/vignettes/a04_rsyncrosim_vignette_spatial.Rmd index 4872c6c6..c0d7548f 100644 --- a/vignettes/a04_rsyncrosim_vignette_spatial.Rmd +++ b/vignettes/a04_rsyncrosim_vignette_spatial.Rmd @@ -67,9 +67,9 @@ Use the `version()` function to ensure you are using the latest version of Syncr version(mySession) ``` -### Installing SyncroSim packages using `addPackage()` +### Installing SyncroSim packages using `installPackage()` -Install `helloworldSpatial` using the `rynscrosim` function `addPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. +Install `helloworldSpatial` using the `rynscrosim` function `installPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. ```{r remove package from server run, warning=FALSE, include=FALSE} installedPackages <- package() @@ -80,7 +80,7 @@ if (is.element( ```{r add package from server, warning = FALSE} # Install helloworldSpatial -addPackage("helloworldSpatial") +installPackage("helloworldSpatial") ``` `helloworldSpatial` should now be included in the package list returned by the `package()` function in `rsyncrosim`: diff --git a/vignettes/a05_rsyncrosim_stsim_vignette.Rmd b/vignettes/a05_rsyncrosim_stsim_vignette.Rmd index 65a27001..d3f5288a 100644 --- a/vignettes/a05_rsyncrosim_stsim_vignette.Rmd +++ b/vignettes/a05_rsyncrosim_stsim_vignette.Rmd @@ -58,9 +58,9 @@ Use the `version()` function to ensure you are using the latest version of Syncr version(mySession) ``` -### Installing SyncroSim packages using `addPackage()` +### Installing SyncroSim packages using `installPackage()` -Install `stsim` using the `rsyncrosim` function `addPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. +Install `stsim` using the `rsyncrosim` function `installPackage()`. This function takes a package name as input and then queries the SyncroSim package server for the specified package. ```{r remove package from server, warning=FALSE, include=FALSE} installedPackages <- package() @@ -71,7 +71,7 @@ if (is.element( ```{r add package from server, warning=FALSE} # Install stsim -addPackage("stsim") +installPackage("stsim") ``` `stsim` should now be included in the package list returned by the `package()` function in `rsyncrosim`: