copySimulations: Copy Simulations (including raster files)

Description Usage Arguments Value Author(s) Examples

View source: R/changeSimulationsPath.R

Description

Copy or move the raster files associated with a Simulations object to another directory and update the paths in the Simulations. The resulting Simulations may be saved.

Usage

1
2
copySimulations(simulations, newPath, newFile, 
  overwrite = FALSE, deleteOld = FALSE)

Arguments

simulations

Simulations

newPath

path to the directory where to save the files; if it is missing, the raster files are not copied

newFile

filename where to save the resulting simulations; if missing, the simulations are not saved and just returned; the file is saved in the directory newPath if given and else in the current directory

overwrite

logical if files may be overwritten when copying the raster files – has no influence on saving of the simulations themselves as .Rdata file

deleteOld

logical if the old raster files are to be deleted (move files to new directory instead of copy)

Value

The simulations with paths in the values updated to the new raster files. In addition the raster files are copied or moved to newPath and the simulations may be saved in a .Rdata file. If the values of the simulations are in memory, there are no raster files to be copied. In this case the function will only save the simulations if a newFile is given.

Author(s)

Kristina B. Helle, kristina.helle@uni-muenster.de

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(sensors4plumesData)
data(radioactivePlumes_area)
radioactivePlumes_area2 = 
  copySimulations(radioactivePlumes_area, 
  newPath = paste0(path.package("sensors4plumesData"), 
  newFile = "radioactivePlumes_area2")

## End(Not run)

KristinaHelle/sensors4plumes documentation built on May 7, 2019, 12:31 p.m.