Learn R Programming

sensors4plumes (version 0.9.3)

changeSimulationsPath: Reset file paths in Simulations objects

Description

Reset file paths in the values of Simulations objects and also in raster objects.

Usage

changeSimulationsPath(simulations, path)

Arguments

simulations

raster or Simulations

path

character with new path(s) for each of the layers

Value

The function returns simulations with replaced paths to the files. If simulations is in memory, it has no effect.

Examples

Run this code
# NOT RUN {
# if data are taken from files, the paths need to be updated
# }
# NOT RUN {
library(sensors4plumesData)
data(radioactivePlumes_area)
radioactivePlumes_area = changeSimulationsPath(radioactivePlumes_area,
c(paste0(path.package("sensors4plumesData"),
          "/extdata/radioactivePlumes_area_finaldose.grd"),
  paste0(path.package("sensors4plumesData"),
          "/extdata/radioactivePlumes_area_maxdose.grd"),
  paste0(path.package("sensors4plumesData"),
          "/extdata/radioactivePlumes_area_time.grd"))
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab