*.inpts or Matlab-like syntax.R/write.vectorized.variable.in.string.R
write.vectorized.variable.in.string.RdWrites one or more variables (scalars, vectors or Rasters) in a string each, following *.inpts or Matlab-like syntax.
write.vectorized.variable.in.string(
l,
NAflag = -9999,
matlab.syntax = FALSE,
...
)a list object contained the variables (scalars, vectors or Rasters) which will be written in a string each.
numeric. Default is -9999, see writeRasterxGEOtop.
logical value. Default is FALSE. If TRUE the file syntax is like the one of a *.m Matlab script file.
further aguments
the string vector <NAME_VARIABLE>==<VALUES_VARIABLE>.
Add Quote if necessary
a <- 1:5
l <- list(v=a,a=a)
out <- write.vectorized.variable.in.string(l,matlab.syntax=TRUE)
out
#> [1] "v=[1,2,3,4,5]" "a=[1,2,3,4,5]"