Compile population data for input to the modSA* modules.
Usage
modSApop(
popType = "VOL",
popTabs = popTables(),
popTabIDs = popTableIDs(),
popFilter = popFilters(),
pltassgn = NULL,
pltassgnid = "PLT_CN",
datsource = "sqlite",
dsn = NULL,
dbconn = NULL,
pjoinid = "CN",
areawt = "CONDPROP_UNADJ",
adj = "plot",
defaultVars = TRUE,
dunitvar = NULL,
dunitarea = NULL,
areavar = "ACRES",
dunitzonal = NULL,
prednames = NULL,
predfac = NULL,
addxy = FALSE,
returndata = TRUE,
savedata = FALSE,
saveobj = FALSE,
objnm = "SApopdat",
unit_opts = list(minplotnum.unit = 2, unit.action = "remove"),
savedata_opts = NULL,
database_opts = NULL,
SAdoms = NULL,
smallbnd = NULL,
smallbnd.domain = NULL,
largebnd.unique = NULL,
SAdata = NULL,
pltdat = NULL,
auxdat = NULL,
...
)
Arguments
- popType
String. Type of evaluation(s) to include in population data. Note: currently only c('CURR', 'VOL', 'LULC') are available. See details below for descriptions of each.
- popTabs
List of population tables the user would like returned. See help(popTables) for a list of options.
- popTabIDs
List of unique IDs corresponding to the population tables that the user has requested. See help(popTableIDs) for a list of options.
- popFilter
List of population filters. See help(popFilters) for a list of options.
- pltassgn
DF/DT, comma-separated values (CSV) file(*.csv), or layer in dsn, Can also be a shapefile(*.shp) with one record per plot, a spatial layer in dsn, or a sf R object. Plot-level assignment of estimation unit and/or strata. Optional.
- pltassgnid
String. Unique identifier of plot in pltassgn.
- datsource
String. Name of data source ('obj', 'sqlite', 'postgres').
- dsn
String. Name of database where tree, cond, and plot-level tables reside. The dsn varies by driver. See gdal OGR vector formats (https://www.gdal.org/ogr_formats.html).
- dbconn
Open database connection.
- pjoinid
String. Join variable in plot to match pltassgnid. Does not need to be uniqueid. If using most current XY coordinates for plot assignments, use identifier for plot (e.g., PLOT_ID).
- areawt
String. Name of variable for summarizing area weights (e.g., CONDPROP_UNADJ).
- adj
String. How to calculate adjustment factors for nonsampled (nonresponse) conditions based on summed proportions for by plot ('samp', 'none'). 'plot' - adjustments are calculated at plot-level. Adjustments are only calculated for annual inventory plots (DESIGNCD=1).
- defaultVars
Logical. If TRUE, a set of default variables are selected.
- dunitvar
String. Name of the domain unit variable in cond, plt, or pltassgn with domain unit assignment for each plot.
- dunitarea
Numeric or DF. Total area by domain unit.
- areavar
String. Name of area variable in unitarea. Default="ACRES".
- dunitzonal
DF/DT. Data frame with zonal auxiliary information by domain unit. For continuous data, means by domain unit; for categorical data, proportion of class by domain unit.
- prednames
String vector. Name(s) of predictor variables to use in model.
- predfac
String vector. Name(s) of factor predictor variables to use in model. Names will change in output depending on number of categories.
- addxy
Logical. If TRUE, adds X/Y attributes to pltassgn.
- returndata
Logical. If TRUE, returns data objects.
- savedata
Logical. If TRUE, saves table(s) to outfolder.
- saveobj
Logical. If TRUE, saves returned list object to outfolder.
- objnm
String. Name of *.rds object.
- unit_opts
List. See help(unit_options()) for a list of options.
- savedata_opts
List. See help(savedata_options()) for a list of options.
- database_opts
List. See help(database_options()) for a list of options. Only used when datsource = 'postgres'.
- SAdoms
sf object. SA domains with attributes for joining.
- smallbnd
sf object. small bound.
- smallbnd.domain
String. Name of attribute defining domain attribute.
- largebnd.unique
String. Name of the large boundary unique identifer to define plots within a model extent. If NULL, all plots are used for model extent.
- SAdata
R List object. Output data list components from FIESTA::SAdata().
- pltdat
R List object. Output data list components from FIESTA::spGetPlots().
- auxdat
R List object. Output data list components from FIESTA::spGetAuxiliary().
- ...
For extendibility.
Value
A list with population data for Small-Area estimates.
- SAdomsdf
Data frame. Attribute table from SAdoms spatial layer. Includes DOMAIN and AOI attributes. DOMAIN represents modeling domains. AOI identifies the small area of interest.
- pltidsadj
Data frame. Condition-level data with condition proportions, domain and predictor assignments, and adjusted condition proportions, if adjplot = TRUE.
- pltcondx
Data frame. Plot/Condition data used for estimation.
- cuniqueid
String. Unique identifier of plot in condx and pltcondx.
- condid
String. Unique identifier of condition in condx and pltcondx.
- treex
Data frame. If esttype='TREE', tree-level data, including adjustment factors, if adjplot = TRUE.
- tuniqueid
String. If esttype='TREE', unique identifier of plot in treex.
- ACI.filter
String. If ACI=FALSE, ACI.filter="COND_STATUS_CD == 1" .
- dunitarea
Data frame. Area by model domain unit.
- areavar
String. Name of area variable in dunitarea.
- dunitvar
String. Name of variable defining model domain units in dunitarea.
- dunitlut
Data frame. Table of model domain units with zonal statistics of predictor values, number of plots by domain unit.
- prednames
String vector. Name of variables in dunitlut and condx defining potential predictors for small area estimation.
- plotsampcnt
Data frame. Number of plots by PLOT_STATUS_CD.
- condsampcnt
Data frame. Number of conditions by COND_STATUS_CD.
- states
String. State names in dataset.
- invyrs
String. Range of inventory years in dataset.
- adjtree
Logical. If TRUE, treex includes adjustment factors.
Details
If variables are NULL, then it will prompt user to input variables.
Necessary variables:
Data | Variable | Description | |
tree | tuniqueid | Unique identifier for each plot, to link to pltassgn (e.g. PLT_CN). | |
CONDID | Unique identifier of each condition on plot, to link to cond. Set CONDID=1, if only 1 condition per plot. | ||
TPA_UNADJ | Number of trees per acre each sample tree represents (e.g. DESIGNCD=1: TPA_UNADJ=6.018046 for trees on subplot; 74.965282 for trees on microplot). | ||
cond | cuniqueid | Unique identifier for each plot, to link to pltassgn (e.g. PLT_CN). | |
CONDID | Unique identifier of each condition on plot. Set CONDID=1, if only 1 condition per plot. | ||
CONDPROP_UNADJ | Unadjusted proportion of condition on each plot. Set CONDPROP_UNADJ=1, if only 1 condition per plot. | ||
COND_STATUS_CD | Status of each forested condition on plot (i.e. accessible forest, nonforest, water, etc.) | ||
NF_COND_STATUS_CD | If ACI=TRUE. Status of each nonforest condition on plot (i.e. accessible nonforest, nonsampled nonforest) | ||
SITECLCD | If landarea=TIMBERLAND. Measure of site productivity. | ||
RESERVCD | If landarea=TIMBERLAND. Reserved status. | ||
SUBPROP_UNADJ | Unadjusted proportion of subplot conditions on each plot. Set SUBPROP_UNADJ=1, if only 1 condition per subplot. | ||
MICRPROP_UNADJ | If microplot trfee attributes. Unadjusted proportion of microplot conditions on each plot. Set MICRPROP_UNADJ=1, if only 1 condition per microplot. | ||
MACRPROP_UNADJ | If macroplot tree attributes. Unadjusted proportion of macroplot conditions on each plot. Set MACRPROP_UNADJ=1, if only 1 condition per macroplot. | ||
pltassgn | puniqueid | Unique identifier for each plot, to link to cond (e.g. CN). | |
STATECD | Identifies state each plot is located in. | ||
INVYR | Identifies inventory year of each plot. | ||
PLOT_STATUS_CD | Status of each plot (i.e. sampled, nonsampled). If not included, all plots are assumed as sampled. |
For available reference tables: sort(unique(FIESTAutils::ref_codes$VARIABLE))
Note
ADJUSTMENT FACTOR:
The adjustment factor is necessary to account for
nonsampled conditions. For model-based estimation, we calculate adjustment
factors by plot.
It is calculated by dividing 1 / summed condition proportions by plot. An adjustment factor is determined for each tree based on the size of the plot it was measured on. This is identified using TPA_UNADJ as follows:
PLOT SIZE | TPA_UNADJ | |
SUBPLOT | 6.018046 | |
MICROPLOT | 74.965282 | |
MACROPLOT | 0.999188 |
If ACI=FALSE, only nonsampled forest conditions are accounted for in the
adjustment factor.
If ACI=TRUE, the nonsampled nonforest conditions are removed as well and
accounted for in adjustment factor. This is if you are interested in
estimates for all lands or nonforest lands in the All-Condition-Inventory.
Examples
# \donttest{
# NOTE: FIA data objects used in these examples are stored in `FIESTA`, but
# can be generated for populations of interest by the user with functions in
# `FIESTA` such as `spGetPlots()`, `spGetAuxiliary()`, etc. For more
# information, see `FIESTA`'s extensive vignettes.
# Population data for counties in Wyoming
modSApop(popTabs = list(tree = FIESTA::WYtree,
cond = FIESTA::WYcond),
pltassgn = FIESTA::WYpltassgn,
pltassgnid = "CN",
dunitarea = FIESTA::WYunitarea,
dunitvar = "ESTN_UNIT",
dunitzonal = FIESTA::WYunitzonal,
prednames = c("dem", "tcc", "tpi", "tnt"),
predfac = "tnt")
#> savedata=FALSE with savedata parameters... no data are saved
#> variables are missing from dataset: STATECD, UNITCD, COUNTYCD, PLOT, PLOT_STATUS_CD, PLOT_NONSAMPLE_REASN_CD, INTENSITY, SUBCYCLE, MACRO_BREAKPOINT_DIA
#> SURVEY table does not exist in database... assuming annual inventory plots
#> INVYR not in input data... no invyrs returned...
#> SUBCYCLE not in data... assuming all SUBCYCLE <> 99
#> removing nonsampled forest plots...
#> returning data needed for estimation...
#> there are 14 nonsampled conditions
#> $module
#> [1] "SA"
#>
#> $smallbnd
#> $smallbnd$AOI
#> [1] 1
#>
#>
#> $smallbnd.domain
#> [1] "AOI"
#>
#> $popType
#> [1] "VOL"
#>
#> $pltidsadj
#> Key: <CN>
#> CN ADJ_FACTOR_COND ADJ_FACTOR_SUBP ADJ_FACTOR_MACR
#> <char> <num> <num> <int>
#> 1: 40404728010690 1 1 0
#> 2: 40404729010690 1 1 0
#> 3: 40404730010690 1 1 0
#> 4: 40404731010690 1 1 0
#> 5: 40404733010690 1 1 0
#> ---
#> 3043: 40407866010690 1 1 0
#> 3044: 40407867010690 1 1 0
#> 3045: 40407868010690 1 1 0
#> 3046: 40407869010690 1 1 0
#> 3047: 46792188020004 1 1 0
#> ADJ_FACTOR_MICR
#> <num>
#> 1: 1
#> 2: 1
#> 3: 1
#> 4: 1
#> 5: 1
#> ---
#> 3043: 1
#> 3044: 1
#> 3045: 1
#> 3046: 1
#> 3047: 1
#>
#> $pltcondx
#> Key: <PLT_CN, CONDID>
#> PLT_CN CONDID COND_NONSAMPLE_REASN_CD CONDPROP_UNADJ
#> <char> <int> <int> <num>
#> 1: 40404728010690 1 NA 1
#> 2: 40404729010690 1 NA 1
#> 3: 40404730010690 1 NA 1
#> 4: 40404731010690 1 NA 1
#> 5: 40404733010690 1 NA 1
#> ---
#> 3220: 40407866010690 1 NA 1
#> 3221: 40407867010690 1 NA 1
#> 3222: 40407868010690 1 NA 1
#> 3223: 40407869010690 1 NA 1
#> 3224: 46792188020004 1 NA 1
#> SUBPPROP_UNADJ MICRPROP_UNADJ MACRPROP_UNADJ OWNCD OWNGRPCD RESERVCD
#> <num> <num> <lgcl> <int> <int> <int>
#> 1: 1 1 NA 46 40 0
#> 2: 1 1 NA 46 40 0
#> 3: 1 1 NA 11 10 0
#> 4: 1 1 NA 22 20 0
#> 5: 1 1 NA 46 40 0
#> ---
#> 3220: 1 1 NA 46 40 0
#> 3221: 1 1 NA 46 40 0
#> 3222: 1 1 NA 12 10 0
#> 3223: 1 1 NA 46 40 0
#> 3224: 1 1 NA 11 10 1
#> SITECLCD STDORGCD ADFORCD LIVE_CANOPY_CVR_PCT COND_STATUS_CD
#> <int> <int> <int> <int> <int>
#> 1: NA NA NA 0 2
#> 2: 7 0 NA 17 1
#> 3: 6 0 206 41 1
#> 4: NA NA NA 0 2
#> 5: NA NA NA 0 2
#> ---
#> 3220: NA NA NA 0 2
#> 3221: NA NA NA 0 2
#> 3222: NA NA 206 1 2
#> 3223: NA NA NA 0 2
#> 3224: 6 0 214 48 1
#> NF_COND_STATUS_CD FORTYPCD STDSZCD STDAGE GSSTKCD DSTRBCD1 DSTRBYR1
#> <int> <int> <int> <int> <int> <int> <int>
#> 1: NA NA NA NA NA NA NA
#> 2: NA 366 1 46 5 0 NA
#> 3: NA 201 1 220 3 0 NA
#> 4: NA NA NA NA NA NA NA
#> 5: NA NA NA NA NA NA NA
#> ---
#> 3220: NA NA NA NA NA NA NA
#> 3221: NA NA NA NA NA NA NA
#> 3222: NA NA NA NA NA NA NA
#> 3223: NA NA NA NA NA NA NA
#> 3224: NA 201 1 109 3 0 NA
#> DSTRBCD2 DSTRBYR2 FORTYPGRPCD TOTAL LANDSTATUSCD
#> <int> <int> <num> <int> <num>
#> 1: NA NA NA 1 NA
#> 2: 0 NA 360 1 2
#> 3: 0 NA 200 1 1
#> 4: NA NA NA 1 NA
#> 5: NA NA NA 1 NA
#> ---
#> 3220: NA NA NA 1 NA
#> 3221: NA NA NA 1 NA
#> 3222: NA NA NA 1 NA
#> 3223: NA NA NA 1 NA
#> 3224: 0 NA 200 1 3
#> LANDSTATUSNM DSTRBGRP
#> <char> <char>
#> 1: <NA> <NA>
#> 2: Other forestland 0
#> 3: Timberland 0
#> 4: <NA> <NA>
#> 5: <NA> <NA>
#> ---
#> 3220: <NA> <NA>
#> 3221: <NA> <NA>
#> 3222: <NA> <NA>
#> 3223: <NA> <NA>
#> 3224: Reserved productive forestland 0
#>
#> $pltcondflds
#> [1] "PLT_CN" "CONDID"
#> [3] "COND_NONSAMPLE_REASN_CD" "CONDPROP_UNADJ"
#> [5] "SUBPPROP_UNADJ" "MICRPROP_UNADJ"
#> [7] "MACRPROP_UNADJ" "OWNCD"
#> [9] "OWNGRPCD" "RESERVCD"
#> [11] "SITECLCD" "STDORGCD"
#> [13] "ADFORCD" "LIVE_CANOPY_CVR_PCT"
#> [15] "COND_STATUS_CD" "NF_COND_STATUS_CD"
#> [17] "FORTYPCD" "STDSZCD"
#> [19] "STDAGE" "GSSTKCD"
#> [21] "DSTRBCD1" "DSTRBYR1"
#> [23] "DSTRBCD2" "DSTRBYR2"
#> [25] "FORTYPGRPCD" "LANDSTATUSCD"
#> [27] "LANDSTATUSNM" "DSTRBGRP"
#>
#> $pjoinid
#> [1] "CN"
#>
#> $cuniqueid
#> [1] "PLT_CN"
#>
#> $pltassgnid
#> [1] "CN"
#>
#> $condid
#> [1] "CONDID"
#>
#> $ACI
#> [1] FALSE
#>
#> $areawt
#> [1] "CONDPROP_UNADJ"
#>
#> $areawt2
#> NULL
#>
#> $adjcase
#> COND
#> "ADJ_FACTOR_COND"
#>
#> $dbqueries
#> $dbqueries$adjfactors
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\n-------------------------------------------\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueries$pltidsadj
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueries$pltcondx
#> [1] "SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)"
#>
#> $dbqueries$TREE
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\n-------------------------------------------\n SELECT t.PLT_CN, t.CONDID, t.SUBP, t.TREE, t.STATUSCD, t.SPCD, t.SPGRPCD, t.DIA, t.HT, t.TREECLCD, t.AGENTCD, t.STANDING_DEAD_CD, t.VOLCFNET, t.VOLCFGRS, t.VOLBFNET, t.TPA_UNADJ, t.DRYBIO_AG, t.CARBON_AG\n FROM pltids\n JOIN treex t ON (t.PLT_CN = pltids.CN)"
#>
#>
#> $dbqueriesWITH
#> $dbqueriesWITH$pltidsWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)"
#>
#> $dbqueriesWITH$pltidsadjWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3),\n----- calculate plot-level adjustment factors\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueriesWITH$pltcondxWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3), \n----- pltcondx\npltcondx AS\n(SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN))"
#>
#> $dbqueriesWITH$pltcondxadjWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3),\n----- calculate plot-level adjustment factors\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN, \n----- pltcondx\npltcondx AS\n(SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN))"
#>
#>
#> $pltassgnx
#> Key: <CN>
#> CN DOMAIN dem tcc tpi tnt
#> <char> <fctr> <num> <num> <num> <fctr>
#> 1: 40404728010690 1 0.8605029 -0.4883215 1.930461976 2
#> 2: 40404729010690 1 0.8807561 -0.1549622 0.158401977 2
#> 3: 40404730010690 1 0.6620211 2.5119114 -2.152005364 1
#> 4: 40404731010690 1 0.5182231 -0.4883215 0.001384002 2
#> 5: 40404733010690 1 0.6660718 -0.4883215 0.248126534 2
#> ---
#> 3043: 40407866010690 45 -1.4159615 -0.3549778 0.046246280 2
#> 3044: 40407867010690 45 -1.3389992 -0.4883215 0.539731344 2
#> 3045: 40407868010690 45 -1.3673537 -0.4883215 0.360282230 2
#> 3046: 40407869010690 45 -1.4949491 -0.4883215 0.248126534 2
#> 3047: 46792188020004 29 0.4412608 0.3784125 0.113539698 2
#> PLOT_STATUS_CD AOI tnt2
#> <int> <num> <num>
#> 1: 2 1 0.4328854
#> 2: 1 1 0.4328854
#> 3: 1 1 -2.3093221
#> 4: 2 1 0.4328854
#> 5: 2 1 0.4328854
#> ---
#> 3043: 2 1 0.4328854
#> 3044: 2 1 0.4328854
#> 3045: 2 1 0.4328854
#> 3046: 2 1 0.4328854
#> 3047: 1 1 0.4328854
#>
#> $dunitlut
#> DOMAIN STATECD COUNTYCD npixels dem tcc tpi
#> <fctr> <int> <num> <num> <num> <num> <num>
#> 1: 1 56 1 1376714 0.6598451 -0.03141457 0.02410391
#> 2: 3 56 3 1010229 -0.6063518 0.03853765 0.02375948
#> 3: 5 56 5 1538394 -1.1747311 -0.32445118 0.02392288
#> 4: 7 56 7 2546066 0.5592886 0.01329258 0.02386679
#> 5: 9 56 9 1362852 -0.5938230 -0.25765696 0.02366908
#> 6: 11 56 11 915454 -1.3094397 0.40230718 0.02371708
#> 7: 13 56 13 2961420 0.3972305 -0.06168731 0.02355032
#> 8: 15 56 15 713352 -1.0811447 -0.39829389 0.02385520
#> 9: 17 56 17 641459 -0.1489854 -0.21369211 0.02429740
#> 10: 19 56 19 1334190 -0.5102112 0.14107300 0.02396383
#> 11: 21 56 21 859967 -0.2463118 -0.41499575 0.02376571
#> 12: 23 56 23 1308662 0.6245413 0.37904477 0.02373278
#> 13: 25 56 25 1720554 -0.1923341 -0.35050535 0.02401586
#> 14: 27 56 27 841523 -1.1468399 -0.42551939 0.02391425
#> 15: 29 56 29 2228161 0.6983394 0.61652010 0.02383676
#> 16: 31 56 31 675011 -0.7592113 -0.26690880 0.02369780
#> 17: 33 56 33 807188 -0.7626303 0.49425044 0.02387319
#> 18: 35 56 35 1577267 1.0107771 0.21888086 0.02454527
#> 19: 37 56 37 3355881 0.2924267 -0.43402957 0.02382172
#> 20: 39 56 39 1349166 1.0255653 1.48278434 0.02372393
#> 21: 41 56 41 668120 0.5315508 -0.15177307 0.02359849
#> 22: 43 56 43 717122 -0.7130302 -0.14297623 0.02342656
#> 23: 45 56 45 767376 -1.1930271 -0.20750101 0.02353014
#> DOMAIN STATECD COUNTYCD npixels dem tcc tpi
#> tnt2 n.total AOI
#> <num> <int> <num>
#> 1: -0.042887844 133 1
#> 2: 0.018075308 98 1
#> 3: 0.354126836 152 1
#> 4: -0.013807115 245 1
#> 5: 0.198092337 133 1
#> 6: -0.313472854 85 1
#> 7: -0.008444611 290 1
#> 8: 0.380809162 70 1
#> 9: -0.020315265 58 1
#> 10: -0.046262537 128 1
#> 11: 0.396036366 86 1
#> 12: -0.299005826 132 1
#> 13: 0.301923399 175 1
#> 14: 0.304101296 79 1
#> 15: -0.728038041 216 1
#> 16: 0.226691002 64 1
#> 17: -0.345621625 82 1
#> 18: -0.222879790 158 1
#> 19: 0.391209881 339 1
#> 20: -1.312464307 125 1
#> 21: 0.133340723 63 1
#> 22: 0.156749635 63 1
#> 23: 0.125040286 73 1
#> tnt2 n.total AOI
#>
#> $dunitarea
#> Key: <DOMAIN>
#> DOMAIN ACRES
#> <num> <num>
#> 1: 1 2757613
#> 2: 3 2021729
#> 3: 5 3072988
#> 4: 7 5096959
#> 5: 9 2729653
#> 6: 11 1837124
#> 7: 13 5930088
#> 8: 15 1428579
#> 9: 17 1283969
#> 10: 19 2671802
#> 11: 21 1720074
#> 12: 23 2616954
#> 13: 25 3440445
#> 14: 27 1681849
#> 15: 29 4459826
#> 16: 31 1350969
#> 17: 33 1617318
#> 18: 35 3158807
#> 19: 37 6714319
#> 20: 39 2701941
#> 21: 41 1336034
#> 22: 43 1435352
#> 23: 45 1536038
#> DOMAIN ACRES
#>
#> $npixels
#> NULL
#>
#> $npixelvar
#> [1] "npixels"
#>
#> $estvar.area
#> [1] "CONDPROP_ADJ"
#>
#> $areavar
#> [1] "ACRES"
#>
#> $areaunits
#> [1] "acres"
#>
#> $dunitvar
#> [1] "DOMAIN"
#>
#> $dunitvars
#> [1] "DOMAIN"
#>
#> $plotsampcnt
#> data frame with 0 columns and 0 rows
#>
#> $condsampcnt
#> COND_STATUS_NM COND_STATUS_CD NBRCONDS
#> 1 Nonforest land 2 2590
#> 2 Forest land 1 590
#> 3 Noncensus water 3 10
#> 4 Nonsampled 5 14
#> 5 Census water 4 20
#>
#> $states
#> [1] "Wyoming"
#>
#> $invyrs
#> NULL
#>
#> $adj
#> [1] "plot"
#>
#> $P2POINTCNT
#> data frame with 0 columns and 0 rows
#>
#> $plotunitcnt
#> ESTN_UNIT NBRPLOTS
#> 1 1 133
#> 2 3 98
#> 3 5 152
#> 4 7 245
#> 5 9 133
#> 6 11 85
#> 7 13 290
#> 8 15 70
#> 9 17 58
#> 10 19 128
#> 11 21 86
#> 12 23 132
#> 13 25 175
#> 14 27 79
#> 15 29 216
#> 16 31 64
#> 17 33 82
#> 18 35 158
#> 19 37 339
#> 20 39 125
#> 21 41 63
#> 22 43 63
#> 23 45 73
#>
#> $treex
#> Key: <PLT_CN, CONDID, SUBP, TREE>
#> PLT_CN CONDID SUBP TREE STATUSCD SPCD SPGRPCD DIA HT
#> <char> <num> <num> <num> <num> <num> <num> <num> <num>
#> 1: 40404729010690 1 1 1 2 113 24 7.7 18
#> 2: 40404729010690 1 1 2 1 66 23 10.8 14
#> 3: 40404729010690 1 1 3 2 113 24 5.2 23
#> 4: 40404729010690 1 1 4 1 113 24 5.2 18
#> 5: 40404729010690 1 3 1 1 113 24 8.8 21
#> ---
#> 18570: 46792188020004 1 4 13 1 202 10 7.0 26
#> 18571: 46792188020004 1 4 14 2 202 10 11.4 53
#> 18572: 46792188020004 1 4 15 2 202 10 10.6 46
#> 18573: 46792188020004 1 4 16 2 202 10 6.3 41
#> 18574: 46792188020004 1 4 17 1 202 10 1.9 8
#> TREECLCD AGENTCD STANDING_DEAD_CD VOLCFNET VOLCFGRS VOLBFNET TPA_UNADJ
#> <num> <num> <num> <num> <num> <num> <num>
#> 1: 3 10 1 1.001201 1.820365 NA 6.018046
#> 2: 3 NA NA NA NA NA 6.018046
#> 3: 3 10 1 0.466414 0.848025 NA 6.018046
#> 4: 2 NA NA 0.630180 0.630180 NA 6.018046
#> 5: 3 NA NA 2.491559 2.931246 NA 6.018046
#> ---
#> 18570: 2 NA NA 2.181686 2.181686 NA 6.018046
#> 18571: 3 NA 1 12.909056 12.909056 NA 6.018046
#> 18572: 3 NA 1 9.630596 9.630596 NA 6.018046
#> 18573: 3 NA 1 2.806583 2.806583 NA 6.018046
#> 18574: 3 NA NA NA NA NA 74.965282
#> DRYBIO_AG CARBON_AG tadjfac
#> <num> <num> <num>
#> 1: 68.327405 34.437012 1
#> 2: 128.287031 61.192914 1
#> 3: 40.245848 20.283907 1
#> 4: 40.612073 19.493795 1
#> 5: 144.251149 69.240551 1
#> ---
#> 18570: 115.692997 59.697586 1
#> 18571: 375.856438 190.183357 1
#> 18572: 270.737020 136.992932 1
#> 18573: 97.948647 49.562015 1
#> 18574: 3.145158 1.622902 1
#>
#> $tuniqueid
#> [1] "PLT_CN"
#>
#> $adjtree
#> [1] FALSE
#>
#> $unitwarnlut
#> Key: <ESTN_UNIT>
#> ESTN_UNIT STATECD COUNTYCD npixels dem tcc tpi
#> <fctr> <int> <num> <num> <num> <num> <num>
#> 1: 1 56 1 1376714 2272.926 6.8530714 1.609176e-03
#> 2: 3 56 3 1010229 1647.743 7.9022732 -3.102019e-04
#> 3: 5 56 5 1538394 1367.107 2.4578633 6.003826e-04
#> 4: 7 56 7 2546066 2223.276 7.5236266 2.878460e-04
#> 5: 9 56 9 1362852 1653.929 3.4596989 -8.139182e-04
#> 6: 11 56 11 915454 1300.595 13.3583927 -5.464502e-04
#> 7: 13 56 13 2961420 2143.260 6.3990155 -1.475728e-03
#> 8: 15 56 15 713352 1413.315 1.3503086 2.232418e-04
#> 9: 17 56 17 641459 1873.567 4.1191205 2.687428e-03
#> 10: 19 56 19 1334190 1695.213 9.4401841 8.285926e-04
#> 11: 21 56 21 859967 1825.512 1.0998002 -2.754466e-04
#> 12: 23 56 23 1308662 2255.494 13.0094837 -4.589611e-04
#> 13: 25 56 25 1720554 1852.164 2.0670811 1.118535e-03
#> 14: 27 56 27 841523 1380.878 0.9419578 5.522725e-04
#> 15: 29 56 29 2228161 2291.932 16.5713373 1.204469e-04
#> 16: 31 56 31 675011 1572.269 3.3209321 -6.538782e-04
#> 17: 33 56 33 807188 1570.581 14.7374346 3.234996e-04
#> 18: 35 56 35 1577267 2446.198 10.6072114 4.068747e-03
#> 19: 37 56 37 3355881 2091.513 0.8143151 3.665207e-05
#> 20: 39 56 39 1349166 2453.499 29.5642925 -5.082770e-04
#> 21: 41 56 41 668120 2209.581 5.0478339 -1.207306e-03
#> 22: 43 56 43 717122 1595.071 5.1797763 -2.165427e-03
#> 23: 45 56 45 767376 1358.073 4.2119798 -1.588204e-03
#> ESTN_UNIT STATECD COUNTYCD npixels dem tcc tpi
#> tnt.1 tnt.2 n.total errtyp
#> <num> <num> <int> <char>
#> 1: 0.17350009 0.8264999 133 none
#> 2: 0.15126867 0.8487313 98 none
#> 3: 0.02872086 0.9712791 152 none
#> 4: 0.16289523 0.8371048 245 none
#> 5: 0.08562192 0.9143781 133 none
#> 6: 0.27217424 0.7278258 85 none
#> 7: 0.16093968 0.8390603 290 none
#> 8: 0.01899063 0.9810094 70 none
#> 9: 0.16526855 0.8347314 58 none
#> 10: 0.17473074 0.8252693 128 none
#> 11: 0.01343772 0.9865623 86 none
#> 12: 0.26689856 0.7331014 132 none
#> 13: 0.04775787 0.9522421 175 none
#> 14: 0.04696366 0.9530363 79 none
#> 15: 0.42335361 0.5766464 216 none
#> 16: 0.07519285 0.9248072 64 none
#> 17: 0.28389793 0.7161021 82 none
#> 18: 0.23913770 0.7608623 158 none
#> 19: 0.01519780 0.9848022 339 none
#> 20: 0.63647616 0.3635238 125 none
#> 21: 0.10923487 0.8907651 63 none
#> 22: 0.10069835 0.8993017 63 none
#> 23: 0.11226179 0.8877382 73 none
#> tnt.1 tnt.2 n.total errtyp
#>
#> $adjfactors
#> Key: <CN>
#> CN ADJ_FACTOR_COND ADJ_FACTOR_SUBP ADJ_FACTOR_MACR
#> <char> <num> <num> <int>
#> 1: 40404728010690 1 1 0
#> 2: 40404729010690 1 1 0
#> 3: 40404730010690 1 1 0
#> 4: 40404731010690 1 1 0
#> 5: 40404733010690 1 1 0
#> ---
#> 3043: 40407866010690 1 1 0
#> 3044: 40407867010690 1 1 0
#> 3045: 40407868010690 1 1 0
#> 3046: 40407869010690 1 1 0
#> 3047: 46792188020004 1 1 0
#> ADJ_FACTOR_MICR
#> <num>
#> 1: 1
#> 2: 1
#> 3: 1
#> 4: 1
#> 5: 1
#> ---
#> 3043: 1
#> 3044: 1
#> 3045: 1
#> 3046: 1
#> 3047: 1
#>
#> $adjvarlst
#> COND SUBP MACR MICR
#> "ADJ_FACTOR_COND" "ADJ_FACTOR_SUBP" "ADJ_FACTOR_MACR" "ADJ_FACTOR_MICR"
#>
#> $prednames
#> [1] "dem" "tcc" "tpi" "tnt2"
#>
#> $predfac
#> [1] "tnt"
#>
#> $popdatindb
#> [1] FALSE
#>
# Adding seedling data as well
modSApop(popTabs = list(tree = FIESTA::WYtree,
cond = FIESTA::WYcond,
seed = FIESTA::WYseed),
pltassgn = FIESTA::WYpltassgn,
pltassgnid = "CN",
dunitarea = FIESTA::WYunitarea,
dunitvar = "ESTN_UNIT",
dunitzonal = FIESTA::WYunitzonal,
prednames = c("dem", "tcc", "tpi", "tnt"),
predfac = "tnt")
#> savedata=FALSE with savedata parameters... no data are saved
#> variables are missing from dataset: STATECD, UNITCD, COUNTYCD, PLOT, PLOT_STATUS_CD, PLOT_NONSAMPLE_REASN_CD, INTENSITY, SUBCYCLE, MACRO_BREAKPOINT_DIA
#> SURVEY table does not exist in database... assuming annual inventory plots
#> INVYR not in input data... no invyrs returned...
#> SUBCYCLE not in data... assuming all SUBCYCLE <> 99
#> removing nonsampled forest plots...
#> returning data needed for estimation...
#> there are 14 nonsampled conditions
#> $module
#> [1] "SA"
#>
#> $smallbnd
#> $smallbnd$AOI
#> [1] 1
#>
#>
#> $smallbnd.domain
#> [1] "AOI"
#>
#> $popType
#> [1] "VOL"
#>
#> $pltidsadj
#> Key: <CN>
#> CN ADJ_FACTOR_COND ADJ_FACTOR_SUBP ADJ_FACTOR_MACR
#> <char> <num> <num> <int>
#> 1: 40404728010690 1 1 0
#> 2: 40404729010690 1 1 0
#> 3: 40404730010690 1 1 0
#> 4: 40404731010690 1 1 0
#> 5: 40404733010690 1 1 0
#> ---
#> 3043: 40407866010690 1 1 0
#> 3044: 40407867010690 1 1 0
#> 3045: 40407868010690 1 1 0
#> 3046: 40407869010690 1 1 0
#> 3047: 46792188020004 1 1 0
#> ADJ_FACTOR_MICR
#> <num>
#> 1: 1
#> 2: 1
#> 3: 1
#> 4: 1
#> 5: 1
#> ---
#> 3043: 1
#> 3044: 1
#> 3045: 1
#> 3046: 1
#> 3047: 1
#>
#> $pltcondx
#> Key: <PLT_CN, CONDID>
#> PLT_CN CONDID COND_NONSAMPLE_REASN_CD CONDPROP_UNADJ
#> <char> <int> <int> <num>
#> 1: 40404728010690 1 NA 1
#> 2: 40404729010690 1 NA 1
#> 3: 40404730010690 1 NA 1
#> 4: 40404731010690 1 NA 1
#> 5: 40404733010690 1 NA 1
#> ---
#> 3220: 40407866010690 1 NA 1
#> 3221: 40407867010690 1 NA 1
#> 3222: 40407868010690 1 NA 1
#> 3223: 40407869010690 1 NA 1
#> 3224: 46792188020004 1 NA 1
#> SUBPPROP_UNADJ MICRPROP_UNADJ MACRPROP_UNADJ OWNCD OWNGRPCD RESERVCD
#> <num> <num> <lgcl> <int> <int> <int>
#> 1: 1 1 NA 46 40 0
#> 2: 1 1 NA 46 40 0
#> 3: 1 1 NA 11 10 0
#> 4: 1 1 NA 22 20 0
#> 5: 1 1 NA 46 40 0
#> ---
#> 3220: 1 1 NA 46 40 0
#> 3221: 1 1 NA 46 40 0
#> 3222: 1 1 NA 12 10 0
#> 3223: 1 1 NA 46 40 0
#> 3224: 1 1 NA 11 10 1
#> SITECLCD STDORGCD ADFORCD LIVE_CANOPY_CVR_PCT COND_STATUS_CD
#> <int> <int> <int> <int> <int>
#> 1: NA NA NA 0 2
#> 2: 7 0 NA 17 1
#> 3: 6 0 206 41 1
#> 4: NA NA NA 0 2
#> 5: NA NA NA 0 2
#> ---
#> 3220: NA NA NA 0 2
#> 3221: NA NA NA 0 2
#> 3222: NA NA 206 1 2
#> 3223: NA NA NA 0 2
#> 3224: 6 0 214 48 1
#> NF_COND_STATUS_CD FORTYPCD STDSZCD STDAGE GSSTKCD DSTRBCD1 DSTRBYR1
#> <int> <int> <int> <int> <int> <int> <int>
#> 1: NA NA NA NA NA NA NA
#> 2: NA 366 1 46 5 0 NA
#> 3: NA 201 1 220 3 0 NA
#> 4: NA NA NA NA NA NA NA
#> 5: NA NA NA NA NA NA NA
#> ---
#> 3220: NA NA NA NA NA NA NA
#> 3221: NA NA NA NA NA NA NA
#> 3222: NA NA NA NA NA NA NA
#> 3223: NA NA NA NA NA NA NA
#> 3224: NA 201 1 109 3 0 NA
#> DSTRBCD2 DSTRBYR2 FORTYPGRPCD TOTAL LANDSTATUSCD
#> <int> <int> <num> <int> <num>
#> 1: NA NA NA 1 NA
#> 2: 0 NA 360 1 2
#> 3: 0 NA 200 1 1
#> 4: NA NA NA 1 NA
#> 5: NA NA NA 1 NA
#> ---
#> 3220: NA NA NA 1 NA
#> 3221: NA NA NA 1 NA
#> 3222: NA NA NA 1 NA
#> 3223: NA NA NA 1 NA
#> 3224: 0 NA 200 1 3
#> LANDSTATUSNM DSTRBGRP
#> <char> <char>
#> 1: <NA> <NA>
#> 2: Other forestland 0
#> 3: Timberland 0
#> 4: <NA> <NA>
#> 5: <NA> <NA>
#> ---
#> 3220: <NA> <NA>
#> 3221: <NA> <NA>
#> 3222: <NA> <NA>
#> 3223: <NA> <NA>
#> 3224: Reserved productive forestland 0
#>
#> $pltcondflds
#> [1] "PLT_CN" "CONDID"
#> [3] "COND_NONSAMPLE_REASN_CD" "CONDPROP_UNADJ"
#> [5] "SUBPPROP_UNADJ" "MICRPROP_UNADJ"
#> [7] "MACRPROP_UNADJ" "OWNCD"
#> [9] "OWNGRPCD" "RESERVCD"
#> [11] "SITECLCD" "STDORGCD"
#> [13] "ADFORCD" "LIVE_CANOPY_CVR_PCT"
#> [15] "COND_STATUS_CD" "NF_COND_STATUS_CD"
#> [17] "FORTYPCD" "STDSZCD"
#> [19] "STDAGE" "GSSTKCD"
#> [21] "DSTRBCD1" "DSTRBYR1"
#> [23] "DSTRBCD2" "DSTRBYR2"
#> [25] "FORTYPGRPCD" "LANDSTATUSCD"
#> [27] "LANDSTATUSNM" "DSTRBGRP"
#>
#> $pjoinid
#> [1] "CN"
#>
#> $cuniqueid
#> [1] "PLT_CN"
#>
#> $pltassgnid
#> [1] "CN"
#>
#> $condid
#> [1] "CONDID"
#>
#> $ACI
#> [1] FALSE
#>
#> $areawt
#> [1] "CONDPROP_UNADJ"
#>
#> $areawt2
#> NULL
#>
#> $adjcase
#> COND
#> "ADJ_FACTOR_COND"
#>
#> $dbqueries
#> $dbqueries$adjfactors
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\n-------------------------------------------\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueries$pltidsadj
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueries$pltcondx
#> [1] "SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)"
#>
#> $dbqueries$TREE
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\n-------------------------------------------\n SELECT t.PLT_CN, t.CONDID, t.SUBP, t.TREE, t.STATUSCD, t.SPCD, t.SPGRPCD, t.DIA, t.HT, t.TREECLCD, t.AGENTCD, t.STANDING_DEAD_CD, t.VOLCFNET, t.VOLCFGRS, t.VOLBFNET, t.TPA_UNADJ, t.DRYBIO_AG, t.CARBON_AG\n FROM pltids\n JOIN treex t ON (t.PLT_CN = pltids.CN)"
#>
#> $dbqueries$SEEDLING
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)\n-------------------------------------------\n SELECT s.PLT_CN, s.SUBP, s.CONDID, s.SPCD, s.SPGRPCD, s.TPA_UNADJ, s.TREECOUNT, s.TREECOUNT_CALC\n FROM pltids\n JOIN seedx s ON (s.PLT_CN = pltids.CN)"
#>
#>
#> $dbqueriesWITH
#> $dbqueriesWITH$pltidsWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3)"
#>
#> $dbqueriesWITH$pltidsadjWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3),\n----- calculate plot-level adjustment factors\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN"
#>
#> $dbqueriesWITH$pltcondxWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3), \n----- pltcondx\npltcondx AS\n(SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN))"
#>
#> $dbqueriesWITH$pltcondxadjWITH
#> [1] "WITH\npltids AS\n(SELECT 'VOL' AS POP_TYP, plta.CN, plta.ESTN_UNIT\nFROM pltassgnx plta \n WHERE plta.PLOT_STATUS_CD != 3),\n----- calculate plot-level adjustment factors\nSELECT pltids.CN,\n COALESCE(1 / NULLIF(SUM(CONDPROP_UNADJ),0), 0) AS ADJ_FACTOR_COND,\n COALESCE(1 / NULLIF(SUM(SUBPPROP_UNADJ),0), 0) AS ADJ_FACTOR_SUBP,\n COALESCE(1 / NULLIF(SUM(MACRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MACR,\n COALESCE(1 / NULLIF(SUM(MICRPROP_UNADJ),0), 0) AS ADJ_FACTOR_MICR\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN)\n WHERE c.COND_STATUS_CD <> 5\n GROUP BY pltids.CN, \n----- pltcondx\npltcondx AS\n(SELECT c.PLT_CN, c.CONDID, c.COND_NONSAMPLE_REASN_CD, c.CONDPROP_UNADJ, c.SUBPPROP_UNADJ, c.MICRPROP_UNADJ, c.MACRPROP_UNADJ, c.OWNCD, c.OWNGRPCD, c.RESERVCD, c.SITECLCD, c.STDORGCD, c.ADFORCD, c.LIVE_CANOPY_CVR_PCT, c.COND_STATUS_CD, c.NF_COND_STATUS_CD, c.FORTYPCD, c.STDSZCD, c.STDAGE, c.GSSTKCD, c.DSTRBCD1, c.DSTRBYR1, c.DSTRBCD2, c.DSTRBYR2, \n (CASE\n WHEN c.FORTYPCD = 100 THEN '100'\n WHEN c.FORTYPCD = 101 THEN '100'\n WHEN c.FORTYPCD = 102 THEN '100'\n WHEN c.FORTYPCD = 103 THEN '100'\n WHEN c.FORTYPCD = 104 THEN '100'\n WHEN c.FORTYPCD = 105 THEN '100'\n WHEN c.FORTYPCD = 120 THEN '120'\n WHEN c.FORTYPCD = 121 THEN '120'\n WHEN c.FORTYPCD = 122 THEN '120'\n WHEN c.FORTYPCD = 123 THEN '120'\n WHEN c.FORTYPCD = 124 THEN '120'\n WHEN c.FORTYPCD = 125 THEN '120'\n WHEN c.FORTYPCD = 126 THEN '120'\n WHEN c.FORTYPCD = 127 THEN '120'\n WHEN c.FORTYPCD = 128 THEN '120'\n WHEN c.FORTYPCD = 129 THEN '120'\n WHEN c.FORTYPCD = 140 THEN '140'\n WHEN c.FORTYPCD = 141 THEN '140'\n WHEN c.FORTYPCD = 142 THEN '140'\n WHEN c.FORTYPCD = 150 THEN '150'\n WHEN c.FORTYPCD = 151 THEN '150'\n WHEN c.FORTYPCD = 160 THEN '160'\n WHEN c.FORTYPCD = 161 THEN '160'\n WHEN c.FORTYPCD = 162 THEN '160'\n WHEN c.FORTYPCD = 163 THEN '160'\n WHEN c.FORTYPCD = 164 THEN '160'\n WHEN c.FORTYPCD = 165 THEN '160'\n WHEN c.FORTYPCD = 166 THEN '160'\n WHEN c.FORTYPCD = 167 THEN '160'\n WHEN c.FORTYPCD = 168 THEN '160'\n WHEN c.FORTYPCD = 170 THEN '170'\n WHEN c.FORTYPCD = 171 THEN '170'\n WHEN c.FORTYPCD = 172 THEN '170'\n WHEN c.FORTYPCD = 180 THEN '180'\n WHEN c.FORTYPCD = 181 THEN '180'\n WHEN c.FORTYPCD = 182 THEN '180'\n WHEN c.FORTYPCD = 183 THEN '180'\n WHEN c.FORTYPCD = 184 THEN '180'\n WHEN c.FORTYPCD = 185 THEN '180'\n WHEN c.FORTYPCD = 200 THEN '200'\n WHEN c.FORTYPCD = 201 THEN '200'\n WHEN c.FORTYPCD = 202 THEN '200'\n WHEN c.FORTYPCD = 203 THEN '200'\n WHEN c.FORTYPCD = 220 THEN '220'\n WHEN c.FORTYPCD = 221 THEN '220'\n WHEN c.FORTYPCD = 222 THEN '220'\n WHEN c.FORTYPCD = 223 THEN '220'\n WHEN c.FORTYPCD = 224 THEN '220'\n WHEN c.FORTYPCD = 225 THEN '220'\n WHEN c.FORTYPCD = 226 THEN '220'\n WHEN c.FORTYPCD = 240 THEN '240'\n WHEN c.FORTYPCD = 241 THEN '240'\n WHEN c.FORTYPCD = 260 THEN '260'\n WHEN c.FORTYPCD = 261 THEN '260'\n WHEN c.FORTYPCD = 262 THEN '260'\n WHEN c.FORTYPCD = 263 THEN '260'\n WHEN c.FORTYPCD = 264 THEN '260'\n WHEN c.FORTYPCD = 265 THEN '260'\n WHEN c.FORTYPCD = 266 THEN '260'\n WHEN c.FORTYPCD = 267 THEN '260'\n WHEN c.FORTYPCD = 268 THEN '260'\n WHEN c.FORTYPCD = 269 THEN '260'\n WHEN c.FORTYPCD = 270 THEN '260'\n WHEN c.FORTYPCD = 271 THEN '260'\n WHEN c.FORTYPCD = 280 THEN '280'\n WHEN c.FORTYPCD = 281 THEN '280'\n WHEN c.FORTYPCD = 300 THEN '300'\n WHEN c.FORTYPCD = 301 THEN '300'\n WHEN c.FORTYPCD = 304 THEN '300'\n WHEN c.FORTYPCD = 305 THEN '300'\n WHEN c.FORTYPCD = 320 THEN '320'\n WHEN c.FORTYPCD = 321 THEN '320'\n WHEN c.FORTYPCD = 340 THEN '340'\n WHEN c.FORTYPCD = 341 THEN '340'\n WHEN c.FORTYPCD = 342 THEN '340'\n WHEN c.FORTYPCD = 360 THEN '360'\n WHEN c.FORTYPCD = 361 THEN '360'\n WHEN c.FORTYPCD = 362 THEN '360'\n WHEN c.FORTYPCD = 363 THEN '360'\n WHEN c.FORTYPCD = 364 THEN '360'\n WHEN c.FORTYPCD = 365 THEN '360'\n WHEN c.FORTYPCD = 366 THEN '360'\n WHEN c.FORTYPCD = 367 THEN '360'\n WHEN c.FORTYPCD = 368 THEN '360'\n WHEN c.FORTYPCD = 369 THEN '360'\n WHEN c.FORTYPCD = 370 THEN '370'\n WHEN c.FORTYPCD = 371 THEN '370'\n WHEN c.FORTYPCD = 380 THEN '380'\n WHEN c.FORTYPCD = 381 THEN '380'\n WHEN c.FORTYPCD = 382 THEN '380'\n WHEN c.FORTYPCD = 383 THEN '380'\n WHEN c.FORTYPCD = 384 THEN '380'\n WHEN c.FORTYPCD = 385 THEN '380'\n WHEN c.FORTYPCD = 390 THEN '390'\n WHEN c.FORTYPCD = 391 THEN '390'\n WHEN c.FORTYPCD = 400 THEN '400'\n WHEN c.FORTYPCD = 401 THEN '400'\n WHEN c.FORTYPCD = 402 THEN '400'\n WHEN c.FORTYPCD = 403 THEN '400'\n WHEN c.FORTYPCD = 404 THEN '400'\n WHEN c.FORTYPCD = 405 THEN '400'\n WHEN c.FORTYPCD = 406 THEN '400'\n WHEN c.FORTYPCD = 407 THEN '400'\n WHEN c.FORTYPCD = 409 THEN '400'\n WHEN c.FORTYPCD = 500 THEN '500'\n WHEN c.FORTYPCD = 501 THEN '500'\n WHEN c.FORTYPCD = 502 THEN '500'\n WHEN c.FORTYPCD = 503 THEN '500'\n WHEN c.FORTYPCD = 504 THEN '500'\n WHEN c.FORTYPCD = 505 THEN '500'\n WHEN c.FORTYPCD = 506 THEN '500'\n WHEN c.FORTYPCD = 507 THEN '500'\n WHEN c.FORTYPCD = 508 THEN '500'\n WHEN c.FORTYPCD = 509 THEN '500'\n WHEN c.FORTYPCD = 510 THEN '500'\n WHEN c.FORTYPCD = 511 THEN '500'\n WHEN c.FORTYPCD = 512 THEN '500'\n WHEN c.FORTYPCD = 513 THEN '500'\n WHEN c.FORTYPCD = 514 THEN '500'\n WHEN c.FORTYPCD = 515 THEN '500'\n WHEN c.FORTYPCD = 516 THEN '500'\n WHEN c.FORTYPCD = 517 THEN '500'\n WHEN c.FORTYPCD = 519 THEN '500'\n WHEN c.FORTYPCD = 520 THEN '500'\n WHEN c.FORTYPCD = 600 THEN '600'\n WHEN c.FORTYPCD = 601 THEN '600'\n WHEN c.FORTYPCD = 602 THEN '600'\n WHEN c.FORTYPCD = 605 THEN '600'\n WHEN c.FORTYPCD = 606 THEN '600'\n WHEN c.FORTYPCD = 607 THEN '600'\n WHEN c.FORTYPCD = 608 THEN '600'\n WHEN c.FORTYPCD = 609 THEN '600'\n WHEN c.FORTYPCD = 700 THEN '700'\n WHEN c.FORTYPCD = 701 THEN '700'\n WHEN c.FORTYPCD = 702 THEN '700'\n WHEN c.FORTYPCD = 703 THEN '700'\n WHEN c.FORTYPCD = 704 THEN '700'\n WHEN c.FORTYPCD = 705 THEN '700'\n WHEN c.FORTYPCD = 706 THEN '700'\n WHEN c.FORTYPCD = 707 THEN '700'\n WHEN c.FORTYPCD = 708 THEN '700'\n WHEN c.FORTYPCD = 709 THEN '700'\n WHEN c.FORTYPCD = 722 THEN '700'\n WHEN c.FORTYPCD = 800 THEN '800'\n WHEN c.FORTYPCD = 801 THEN '800'\n WHEN c.FORTYPCD = 802 THEN '800'\n WHEN c.FORTYPCD = 803 THEN '800'\n WHEN c.FORTYPCD = 805 THEN '800'\n WHEN c.FORTYPCD = 807 THEN '800'\n WHEN c.FORTYPCD = 809 THEN '800'\n WHEN c.FORTYPCD = 900 THEN '900'\n WHEN c.FORTYPCD = 901 THEN '900'\n WHEN c.FORTYPCD = 902 THEN '900'\n WHEN c.FORTYPCD = 903 THEN '900'\n WHEN c.FORTYPCD = 904 THEN '900'\n WHEN c.FORTYPCD = 905 THEN '900'\n WHEN c.FORTYPCD = 910 THEN '910'\n WHEN c.FORTYPCD = 911 THEN '910'\n WHEN c.FORTYPCD = 912 THEN '910'\n WHEN c.FORTYPCD = 920 THEN '920'\n WHEN c.FORTYPCD = 921 THEN '920'\n WHEN c.FORTYPCD = 922 THEN '920'\n WHEN c.FORTYPCD = 923 THEN '920'\n WHEN c.FORTYPCD = 924 THEN '920'\n WHEN c.FORTYPCD = 925 THEN '920'\n WHEN c.FORTYPCD = 926 THEN '920'\n WHEN c.FORTYPCD = 931 THEN '920'\n WHEN c.FORTYPCD = 932 THEN '920'\n WHEN c.FORTYPCD = 933 THEN '920'\n WHEN c.FORTYPCD = 934 THEN '920'\n WHEN c.FORTYPCD = 935 THEN '920'\n WHEN c.FORTYPCD = 940 THEN '940'\n WHEN c.FORTYPCD = 941 THEN '940'\n WHEN c.FORTYPCD = 942 THEN '940'\n WHEN c.FORTYPCD = 943 THEN '940'\n WHEN c.FORTYPCD = 950 THEN '950'\n WHEN c.FORTYPCD = 951 THEN '950'\n WHEN c.FORTYPCD = 952 THEN '950'\n WHEN c.FORTYPCD = 953 THEN '950'\n WHEN c.FORTYPCD = 954 THEN '950'\n WHEN c.FORTYPCD = 955 THEN '950'\n WHEN c.FORTYPCD = 960 THEN '960'\n WHEN c.FORTYPCD = 961 THEN '960'\n WHEN c.FORTYPCD = 962 THEN '960'\n WHEN c.FORTYPCD = 970 THEN '970'\n WHEN c.FORTYPCD = 971 THEN '970'\n WHEN c.FORTYPCD = 972 THEN '970'\n WHEN c.FORTYPCD = 973 THEN '970'\n WHEN c.FORTYPCD = 974 THEN '970'\n WHEN c.FORTYPCD = 975 THEN '970'\n WHEN c.FORTYPCD = 976 THEN '970'\n WHEN c.FORTYPCD = 980 THEN '980'\n WHEN c.FORTYPCD = 981 THEN '980'\n WHEN c.FORTYPCD = 982 THEN '980'\n WHEN c.FORTYPCD = 983 THEN '980'\n WHEN c.FORTYPCD = 984 THEN '980'\n WHEN c.FORTYPCD = 985 THEN '980'\n WHEN c.FORTYPCD = 986 THEN '980'\n WHEN c.FORTYPCD = 987 THEN '980'\n WHEN c.FORTYPCD = 988 THEN '980'\n WHEN c.FORTYPCD = 989 THEN '980'\n WHEN c.FORTYPCD = 990 THEN '990'\n WHEN c.FORTYPCD = 991 THEN '990'\n WHEN c.FORTYPCD = 992 THEN '990'\n WHEN c.FORTYPCD = 993 THEN '990'\n WHEN c.FORTYPCD = 995 THEN '990'\n WHEN c.FORTYPCD = 999 THEN '999' END) AS FORTYPGRPCD, 1 AS TOTAL\n FROM pltids\n JOIN condx c ON (c.PLT_CN = pltids.CN))"
#>
#>
#> $pltassgnx
#> Key: <CN>
#> CN DOMAIN dem tcc tpi tnt
#> <char> <fctr> <num> <num> <num> <fctr>
#> 1: 40404728010690 1 0.8605029 -0.4883215 1.930461976 2
#> 2: 40404729010690 1 0.8807561 -0.1549622 0.158401977 2
#> 3: 40404730010690 1 0.6620211 2.5119114 -2.152005364 1
#> 4: 40404731010690 1 0.5182231 -0.4883215 0.001384002 2
#> 5: 40404733010690 1 0.6660718 -0.4883215 0.248126534 2
#> ---
#> 3043: 40407866010690 45 -1.4159615 -0.3549778 0.046246280 2
#> 3044: 40407867010690 45 -1.3389992 -0.4883215 0.539731344 2
#> 3045: 40407868010690 45 -1.3673537 -0.4883215 0.360282230 2
#> 3046: 40407869010690 45 -1.4949491 -0.4883215 0.248126534 2
#> 3047: 46792188020004 29 0.4412608 0.3784125 0.113539698 2
#> PLOT_STATUS_CD AOI tnt2
#> <int> <num> <num>
#> 1: 2 1 0.4328854
#> 2: 1 1 0.4328854
#> 3: 1 1 -2.3093221
#> 4: 2 1 0.4328854
#> 5: 2 1 0.4328854
#> ---
#> 3043: 2 1 0.4328854
#> 3044: 2 1 0.4328854
#> 3045: 2 1 0.4328854
#> 3046: 2 1 0.4328854
#> 3047: 1 1 0.4328854
#>
#> $dunitlut
#> DOMAIN STATECD COUNTYCD npixels dem tcc tpi
#> <fctr> <int> <num> <num> <num> <num> <num>
#> 1: 1 56 1 1376714 0.6598451 -0.03141457 0.02410391
#> 2: 3 56 3 1010229 -0.6063518 0.03853765 0.02375948
#> 3: 5 56 5 1538394 -1.1747311 -0.32445118 0.02392288
#> 4: 7 56 7 2546066 0.5592886 0.01329258 0.02386679
#> 5: 9 56 9 1362852 -0.5938230 -0.25765696 0.02366908
#> 6: 11 56 11 915454 -1.3094397 0.40230718 0.02371708
#> 7: 13 56 13 2961420 0.3972305 -0.06168731 0.02355032
#> 8: 15 56 15 713352 -1.0811447 -0.39829389 0.02385520
#> 9: 17 56 17 641459 -0.1489854 -0.21369211 0.02429740
#> 10: 19 56 19 1334190 -0.5102112 0.14107300 0.02396383
#> 11: 21 56 21 859967 -0.2463118 -0.41499575 0.02376571
#> 12: 23 56 23 1308662 0.6245413 0.37904477 0.02373278
#> 13: 25 56 25 1720554 -0.1923341 -0.35050535 0.02401586
#> 14: 27 56 27 841523 -1.1468399 -0.42551939 0.02391425
#> 15: 29 56 29 2228161 0.6983394 0.61652010 0.02383676
#> 16: 31 56 31 675011 -0.7592113 -0.26690880 0.02369780
#> 17: 33 56 33 807188 -0.7626303 0.49425044 0.02387319
#> 18: 35 56 35 1577267 1.0107771 0.21888086 0.02454527
#> 19: 37 56 37 3355881 0.2924267 -0.43402957 0.02382172
#> 20: 39 56 39 1349166 1.0255653 1.48278434 0.02372393
#> 21: 41 56 41 668120 0.5315508 -0.15177307 0.02359849
#> 22: 43 56 43 717122 -0.7130302 -0.14297623 0.02342656
#> 23: 45 56 45 767376 -1.1930271 -0.20750101 0.02353014
#> DOMAIN STATECD COUNTYCD npixels dem tcc tpi
#> tnt2 n.total AOI
#> <num> <int> <num>
#> 1: -0.042887844 133 1
#> 2: 0.018075308 98 1
#> 3: 0.354126836 152 1
#> 4: -0.013807115 245 1
#> 5: 0.198092337 133 1
#> 6: -0.313472854 85 1
#> 7: -0.008444611 290 1
#> 8: 0.380809162 70 1
#> 9: -0.020315265 58 1
#> 10: -0.046262537 128 1
#> 11: 0.396036366 86 1
#> 12: -0.299005826 132 1
#> 13: 0.301923399 175 1
#> 14: 0.304101296 79 1
#> 15: -0.728038041 216 1
#> 16: 0.226691002 64 1
#> 17: -0.345621625 82 1
#> 18: -0.222879790 158 1
#> 19: 0.391209881 339 1
#> 20: -1.312464307 125 1
#> 21: 0.133340723 63 1
#> 22: 0.156749635 63 1
#> 23: 0.125040286 73 1
#> tnt2 n.total AOI
#>
#> $dunitarea
#> Key: <DOMAIN>
#> DOMAIN ACRES
#> <num> <num>
#> 1: 1 2757613
#> 2: 3 2021729
#> 3: 5 3072988
#> 4: 7 5096959
#> 5: 9 2729653
#> 6: 11 1837124
#> 7: 13 5930088
#> 8: 15 1428579
#> 9: 17 1283969
#> 10: 19 2671802
#> 11: 21 1720074
#> 12: 23 2616954
#> 13: 25 3440445
#> 14: 27 1681849
#> 15: 29 4459826
#> 16: 31 1350969
#> 17: 33 1617318
#> 18: 35 3158807
#> 19: 37 6714319
#> 20: 39 2701941
#> 21: 41 1336034
#> 22: 43 1435352
#> 23: 45 1536038
#> DOMAIN ACRES
#>
#> $npixels
#> NULL
#>
#> $npixelvar
#> [1] "npixels"
#>
#> $estvar.area
#> [1] "CONDPROP_ADJ"
#>
#> $areavar
#> [1] "ACRES"
#>
#> $areaunits
#> [1] "acres"
#>
#> $dunitvar
#> [1] "DOMAIN"
#>
#> $dunitvars
#> [1] "DOMAIN"
#>
#> $plotsampcnt
#> data frame with 0 columns and 0 rows
#>
#> $condsampcnt
#> COND_STATUS_NM COND_STATUS_CD NBRCONDS
#> 1 Nonforest land 2 2590
#> 2 Forest land 1 590
#> 3 Noncensus water 3 10
#> 4 Nonsampled 5 14
#> 5 Census water 4 20
#>
#> $states
#> [1] "Wyoming"
#>
#> $invyrs
#> NULL
#>
#> $adj
#> [1] "plot"
#>
#> $P2POINTCNT
#> data frame with 0 columns and 0 rows
#>
#> $plotunitcnt
#> ESTN_UNIT NBRPLOTS
#> 1 1 133
#> 2 3 98
#> 3 5 152
#> 4 7 245
#> 5 9 133
#> 6 11 85
#> 7 13 290
#> 8 15 70
#> 9 17 58
#> 10 19 128
#> 11 21 86
#> 12 23 132
#> 13 25 175
#> 14 27 79
#> 15 29 216
#> 16 31 64
#> 17 33 82
#> 18 35 158
#> 19 37 339
#> 20 39 125
#> 21 41 63
#> 22 43 63
#> 23 45 73
#>
#> $treex
#> Key: <PLT_CN, CONDID, SUBP, TREE>
#> PLT_CN CONDID SUBP TREE STATUSCD SPCD SPGRPCD DIA HT
#> <char> <num> <num> <num> <num> <num> <num> <num> <num>
#> 1: 40404729010690 1 1 1 2 113 24 7.7 18
#> 2: 40404729010690 1 1 2 1 66 23 10.8 14
#> 3: 40404729010690 1 1 3 2 113 24 5.2 23
#> 4: 40404729010690 1 1 4 1 113 24 5.2 18
#> 5: 40404729010690 1 3 1 1 113 24 8.8 21
#> ---
#> 18570: 46792188020004 1 4 13 1 202 10 7.0 26
#> 18571: 46792188020004 1 4 14 2 202 10 11.4 53
#> 18572: 46792188020004 1 4 15 2 202 10 10.6 46
#> 18573: 46792188020004 1 4 16 2 202 10 6.3 41
#> 18574: 46792188020004 1 4 17 1 202 10 1.9 8
#> TREECLCD AGENTCD STANDING_DEAD_CD VOLCFNET VOLCFGRS VOLBFNET TPA_UNADJ
#> <num> <num> <num> <num> <num> <num> <num>
#> 1: 3 10 1 1.001201 1.820365 NA 6.018046
#> 2: 3 NA NA NA NA NA 6.018046
#> 3: 3 10 1 0.466414 0.848025 NA 6.018046
#> 4: 2 NA NA 0.630180 0.630180 NA 6.018046
#> 5: 3 NA NA 2.491559 2.931246 NA 6.018046
#> ---
#> 18570: 2 NA NA 2.181686 2.181686 NA 6.018046
#> 18571: 3 NA 1 12.909056 12.909056 NA 6.018046
#> 18572: 3 NA 1 9.630596 9.630596 NA 6.018046
#> 18573: 3 NA 1 2.806583 2.806583 NA 6.018046
#> 18574: 3 NA NA NA NA NA 74.965282
#> DRYBIO_AG CARBON_AG tadjfac
#> <num> <num> <num>
#> 1: 68.327405 34.437012 1
#> 2: 128.287031 61.192914 1
#> 3: 40.245848 20.283907 1
#> 4: 40.612073 19.493795 1
#> 5: 144.251149 69.240551 1
#> ---
#> 18570: 115.692997 59.697586 1
#> 18571: 375.856438 190.183357 1
#> 18572: 270.737020 136.992932 1
#> 18573: 97.948647 49.562015 1
#> 18574: 3.145158 1.622902 1
#>
#> $tuniqueid
#> [1] "PLT_CN"
#>
#> $adjtree
#> [1] FALSE
#>
#> $seedx
#> Key: <PLT_CN, CONDID, SUBP>
#> PLT_CN SUBP CONDID SPCD SPGRPCD TPA_UNADJ TREECOUNT
#> <char> <num> <num> <num> <num> <num> <num>
#> 1: 40404729010690 2 1 113 24 74.96528 1
#> 2: 40404730010690 2 1 202 10 224.89585 3
#> 3: 40404738010690 2 1 746 44 2323.92376 31
#> 4: 40404738010690 4 1 19 12 74.96528 1
#> 5: 40404738010690 4 1 113 24 74.96528 1
#> ---
#> 1603: 40407815010690 1 1 313 47 224.89585 3
#> 1604: 40407831010690 1 1 122 11 4497.91695 60
#> 1605: 46792188020004 2 1 202 10 374.82641 5
#> 1606: 46792188020004 3 1 202 10 299.86113 4
#> 1607: 46792188020004 4 1 202 10 224.89585 3
#> TREECOUNT_CALC tadjfac
#> <num> <num>
#> 1: 1 1
#> 2: 3 1
#> 3: 31 1
#> 4: 1 1
#> 5: 1 1
#> ---
#> 1603: 3 2
#> 1604: 60 1
#> 1605: 5 1
#> 1606: 4 1
#> 1607: 3 1
#>
#> $unitwarnlut
#> Key: <ESTN_UNIT>
#> ESTN_UNIT STATECD COUNTYCD npixels dem tcc tpi
#> <fctr> <int> <num> <num> <num> <num> <num>
#> 1: 1 56 1 1376714 2272.926 6.8530714 1.609176e-03
#> 2: 3 56 3 1010229 1647.743 7.9022732 -3.102019e-04
#> 3: 5 56 5 1538394 1367.107 2.4578633 6.003826e-04
#> 4: 7 56 7 2546066 2223.276 7.5236266 2.878460e-04
#> 5: 9 56 9 1362852 1653.929 3.4596989 -8.139182e-04
#> 6: 11 56 11 915454 1300.595 13.3583927 -5.464502e-04
#> 7: 13 56 13 2961420 2143.260 6.3990155 -1.475728e-03
#> 8: 15 56 15 713352 1413.315 1.3503086 2.232418e-04
#> 9: 17 56 17 641459 1873.567 4.1191205 2.687428e-03
#> 10: 19 56 19 1334190 1695.213 9.4401841 8.285926e-04
#> 11: 21 56 21 859967 1825.512 1.0998002 -2.754466e-04
#> 12: 23 56 23 1308662 2255.494 13.0094837 -4.589611e-04
#> 13: 25 56 25 1720554 1852.164 2.0670811 1.118535e-03
#> 14: 27 56 27 841523 1380.878 0.9419578 5.522725e-04
#> 15: 29 56 29 2228161 2291.932 16.5713373 1.204469e-04
#> 16: 31 56 31 675011 1572.269 3.3209321 -6.538782e-04
#> 17: 33 56 33 807188 1570.581 14.7374346 3.234996e-04
#> 18: 35 56 35 1577267 2446.198 10.6072114 4.068747e-03
#> 19: 37 56 37 3355881 2091.513 0.8143151 3.665207e-05
#> 20: 39 56 39 1349166 2453.499 29.5642925 -5.082770e-04
#> 21: 41 56 41 668120 2209.581 5.0478339 -1.207306e-03
#> 22: 43 56 43 717122 1595.071 5.1797763 -2.165427e-03
#> 23: 45 56 45 767376 1358.073 4.2119798 -1.588204e-03
#> ESTN_UNIT STATECD COUNTYCD npixels dem tcc tpi
#> tnt.1 tnt.2 n.total errtyp
#> <num> <num> <int> <char>
#> 1: 0.17350009 0.8264999 133 none
#> 2: 0.15126867 0.8487313 98 none
#> 3: 0.02872086 0.9712791 152 none
#> 4: 0.16289523 0.8371048 245 none
#> 5: 0.08562192 0.9143781 133 none
#> 6: 0.27217424 0.7278258 85 none
#> 7: 0.16093968 0.8390603 290 none
#> 8: 0.01899063 0.9810094 70 none
#> 9: 0.16526855 0.8347314 58 none
#> 10: 0.17473074 0.8252693 128 none
#> 11: 0.01343772 0.9865623 86 none
#> 12: 0.26689856 0.7331014 132 none
#> 13: 0.04775787 0.9522421 175 none
#> 14: 0.04696366 0.9530363 79 none
#> 15: 0.42335361 0.5766464 216 none
#> 16: 0.07519285 0.9248072 64 none
#> 17: 0.28389793 0.7161021 82 none
#> 18: 0.23913770 0.7608623 158 none
#> 19: 0.01519780 0.9848022 339 none
#> 20: 0.63647616 0.3635238 125 none
#> 21: 0.10923487 0.8907651 63 none
#> 22: 0.10069835 0.8993017 63 none
#> 23: 0.11226179 0.8877382 73 none
#> tnt.1 tnt.2 n.total errtyp
#>
#> $adjfactors
#> Key: <CN>
#> CN ADJ_FACTOR_COND ADJ_FACTOR_SUBP ADJ_FACTOR_MACR
#> <char> <num> <num> <int>
#> 1: 40404728010690 1 1 0
#> 2: 40404729010690 1 1 0
#> 3: 40404730010690 1 1 0
#> 4: 40404731010690 1 1 0
#> 5: 40404733010690 1 1 0
#> ---
#> 3043: 40407866010690 1 1 0
#> 3044: 40407867010690 1 1 0
#> 3045: 40407868010690 1 1 0
#> 3046: 40407869010690 1 1 0
#> 3047: 46792188020004 1 1 0
#> ADJ_FACTOR_MICR
#> <num>
#> 1: 1
#> 2: 1
#> 3: 1
#> 4: 1
#> 5: 1
#> ---
#> 3043: 1
#> 3044: 1
#> 3045: 1
#> 3046: 1
#> 3047: 1
#>
#> $adjvarlst
#> COND SUBP MACR MICR
#> "ADJ_FACTOR_COND" "ADJ_FACTOR_SUBP" "ADJ_FACTOR_MACR" "ADJ_FACTOR_MICR"
#>
#> $prednames
#> [1] "dem" "tcc" "tpi" "tnt2"
#>
#> $predfac
#> [1] "tnt"
#>
#> $popdatindb
#> [1] FALSE
#>
# }