
The readPAR
function reads the value of any parameter in a namelist
in one of the MAESTRA/MAESPA input files. Also works for other text files
that have the FORTRAN namelist input structure. Optionally specifies in
which namelist to look for the parameter.
To read an entire namelist into a list, use the readNameList
function.
readNameList(datfile, namelist)
readPAR(datfile, parname, namelist = NA, fail = TRUE)
readPAR
, either one value, or a vector, depending on how
many values are specified for the parameter in the input file.For readNameList
, a named list.
replacePAR
, readNameList
## Not run:
# # Read the number of trees in the plot:
# readPAR("confile.dat", "notrees", "plot")
#
# # Read the X and Y coordinates:
# readPAR("confile.dat", "xycoords", "xy")
#
# # Read entire namelist
# readNameList("trees.dat", "plot")
#
# ## End(Not run)
Run the code above in your browser using DataLab