build.rastLUT {ModelMap} | R Documentation |
Build a raster Look-UP-Table for training dataset
Description
GUI prompts will help the user build a Look-Up-Table to associated predictor variable with their corresponding spatial rasters.
Usage
build.rastLUT(imageList=NULL,predList=NULL,qdata.trainfn=NULL,
rastLUTfn=NULL,folder=NULL)
Arguments
imageList |
Vector. A vector of character strings giving names and full paths to all raster data files used in model. |
predList |
Vector. A vector of character strings giving the predictor names used as headers in the model training data. |
qdata.trainfn |
String. The name (full path or base name with path specified by |
rastLUTfn |
String. The name of the file output for the Look-Up-Table. By default, if a file name is provided by the |
folder |
String. The folder used for output. Do not add ending slash to path string. If |
Details
This function helps the user create a raster Look-Up-Table to be used later by model.mapmake()
. Currently this function only works in a Windows environment.
First, if "folder"
is not given, the user selects the output folder for the Look-UP-Table.
Second, if "predList"
or "qdatatrainfn"
are not given, the user selects the file containing the training data. The header of the file is used to generate a selection list of possible predictor variables.
Third, if "imageList"
is not provided, the user selects the rasters.
Finally, the function steps through each band of each raster, and the user selects the appropriate predictor.
Value
Returns a data frame containing the raster Look-Up-Table. Also Writes a .csv
file containing the raster Look-Up-Table.
Author(s)
Elizabeth Freeman
Examples
## Not run:
folder<-system.file("extdata", "helpexamples", package = "ModelMap")
qdata.trainfn = paste(folder,"/DATATRAIN.csv",sep="")
#build.rastLUT( qdata.trainfn=qdata.trainfn,
# folder=folder)
## End(Not run) # end dontrun