Updates the provided rvi file with the command and value provided.

rvn_rvi_commandupdate(
  filename = NULL,
  command = NULL,
  value = NULL,
  outputfile = NA
)

Arguments

filename

the name of the .rvi file (with .rvi extension included), either relative to the working directory or absolute.

command

the rvi command with preceeding colon to update

value

value of the command to update

outputfile

if writing to a new file, otherwise filename is overwritten

Value

returns TRUE if run successfully

See also

rvn_rvi_read to read and process rvi files with RavenR

Author

James R. Craig, University of Waterloo

Examples

  # load example rvi file
  ff <- system.file("extdata","Nith.rvi", package="RavenR")
  tf <- tempfile(fileext=".rvi")

  rvn_rvi_commandupdate(filename=ff,
  command=":StartDate",
  value="2022-10-01 00:00:00",
  outputfile=tf)
#> [1] "Raven file /home/runner/work/_temp/Library/RavenR/extdata/Nith.rvi has been updated for command :StartDate with value 2022-10-01 00:00:00"
#> [1] TRUE