impute {rconifers} | R Documentation |
Imputes missing values for a CONIFERS sample.data object.
impute( x, control=list(fpr=11.78, min.dbh=5.6, baf=40.0) )
x |
a CONIFERS sample.data object |
control |
a list object that controls how missing expansion factors are calculated (See details) |
The impute function returns a list object of class
sample.data
that contains all the required data
elements needed to call most CONIFERS functions. The control
argument needs to contain at least the following elements:
min.dbh
argument.min.dbh
impute
returns a sample.data
object with
no missing values that can then be used in any rconifers
function.
Jeff D. Hamann jeff.hamann@forestinformatics.com,
Martin W. Ritchie mritchie@fs.fed.us
Ritchie, M.W. 2008. User's Guide and Help System for CONIFERS: A Simulator for Young Conifer Plantations Version 4.10. See http://www.fs.fed.us/psw/programs/ecology_of_western_forests/projects/conifers/
calc.max.sdi
,
impute
,
project
,
rand.seed
,
rconifers
,
sample.data
,
set.species.map
,
set.variant
,
smc
,
summary.sample.data
,
swo
,
thin
library( rconifers ) ## set the variant to the SWO variant and set species map set.species.map( set.variant(0) ) ## grow the data that was originally swo in the smc variant # load and display CONIFERS example plots data( plots.swo ) print( plots.swo ) # load and display CONIFERS example plants data( plants.swo ) print( plants.swo ) # view the current crown widths for first 7 obs plants.swo[1:7,] # remove crown.width observations from plants 3 to 6 to test # the impute function blanks <- c(3:6) plants.swo[blanks,]$crown.width <- NA plants.swo[1:7,] # create the sample.data list object sample.swo.3 <- list( plots=plots.swo, plants=plants.swo, age=3, x0=0.0 ) class(sample.swo.3) <- "sample.data" # fill in missing values sample.swo.3.imp <- impute( sample.swo.3 ) # view imputed values sample.swo.3.imp$plants[1:7,]