write.dssat {Dasst} | R Documentation |
Write to a DSSAT-style file from an object of class Dasst
Description
write.dssat
writes to a file the contents of an
object of class Dasst
.
Usage
write.dssat(object, fnames)
Arguments
object |
An object of class
|
fnames |
A character vector. The paths to the files
where the contents of the object of class
|
Details
This function writes to a file the contents of an object
of class Dasst
striving to maintain
compatibility with the DSSAT-style format specifications.
The fnames
vector specifies the paths to the files
where data will be stored. Each table of the
Dasst
object may be saved in an
individual file. If the length of fnames
vector is
shorter than the length of the object, then the paths
will be recycled as necessary.
If paths contain file names that already exist, first the
original files are saved appending a ‘.bak’
extension. Then, the Dasst
object is
saved using these paths.
Examples
data(plantGrowth)
length(plantGrowth) <- 1
ffn <- paste(tempdir(), "PlantGro.OUT", sep="/")
write.dssat(plantGrowth, ffn)