@@ -110,6 +110,7 @@ mkCheckBox <- function (pkey, pmt, choices, fpvs)
110110mkSelectInput <- function (inputId , label , choices , fpvs ,
111111 type = " list" , valpair = FALSE )
112112{
113+ llast <- FALSE
113114 choices = trim(scan(text = choices ,what = " " ,sep = " \n " ,quiet = TRUE ))
114115 sel = grep (" ^>" ,choices )
115116 if (length(sel )) choices [sel ] = trim(substring(choices [sel ],2 ))
@@ -127,10 +128,17 @@ cat ("in mkSelectInput type=",type," fpvs=",fpvs," sel=",sel,"\n")
127128 names(mklist ) = choices
128129
129130 if (length(sel ) && edt == 0 )
130- {
131- if (sel == length(choices )) sel <- sel - 1
131+ {
132+ if (sel == length(choices )){
133+ sel <- sel - 1
134+ llast <- TRUE
135+ }
132136 if (! valpair ) sel = match(as.character(sel ),mklist )
133- if (is.na(sel )) sel <- " 0" else as.character(if (valpair ) sel <- sel else sel <- sel - 2 )
137+ if (is.na(sel )) sel <- " 0" else as.character(if (valpair ) sel <- sel else {
138+ if (llast ) sel <- sel - 1
139+ else sel <- sel - 2
140+ })
141+ # if (is.na(sel)) sel <- "0" else as.character(if (valpair) sel <- sel else if(sel == length(choices)) sel <- sel-1 else sel <- sel-2)
134142 }
135143 if (! length(sel ) && edt == 0 ) sel = " 0"
136144 if (! length(sel ) && edt == 1 && ! valpair ) sel = mklist [1 ]
@@ -464,25 +472,34 @@ mkVarList <- function (globals)
464472 " Age: Age at beginning of an FVS cycle" = " Age" ,
465473 " AgeCmp: Estimated average age for the dominant size class" = " AgeCmp" ,
466474 " Aspect: Aspect in degrees" = " Aspect" ,
475+ " BAbvBio: Before thin above ground biomass" = " BAbvBio" ,
476+ " BAbvCrb: Before thin above ground carbon" = " BAbvCrb" ,
467477 " BaDBH: Before thin quadractic mean DBH" = " BaDBH" ,
468478 " BBA: Before thin basal area" = " BBA" ,
469- " BBdFt: Before thin board foot (western variants) sawtimber (eastern variants) volume" = " BBdFt" ,
479+ " BBdFt: Before thin board foot volume" = " BBdFt" ,
470480 " BCanCov: Before thin percent canopy cover (StrClass keyword required)" = " BCanCov" ,
471481 " BCCF: Before thin CCF" = " BCCF" ,
472482 " BDBHwtBA: Before thin average DBH weighted by stand basal area" = " BDBHwtBA" ,
473- " BHTWTBA: Before thin average height weighted by stand basal area" = " BHTWTBA" ,
483+ " BHTWTBA: Before thin average height weighted by stand basal area (Lorey's Height)" = " BHTWTBA" ,
484+ " BFolBio: Before thin foliage biomass" = " BFolBio" ,
485+ " BFolCrb: Before thin foliage carbon" = " BfolCrb" ,
474486 " BMaxHS: Before thin height of tallest tree in uppermost stratum (StrClass keyword required)" = " BMaxHS" ,
475- " BMCuFt: Before thin merchantable (western variants) sawtimber (eastern variants) cubic foot volume" = " BMCuFt" ,
487+ " BMCuFt: Before thin merchantable cubic foot volume" = " BMCuFt" ,
488+ " BMerBio: Before thin merchantable biomass" = " BMerBio" ,
489+ " BMerCrb: Before thin merchantable carbon" = " BMerCrb" ,
476490 " BMinHS: Before thin height of shortest tree in uppermost stratum (StrClass keyword required)" = " BMinHS" ,
477491 " BNumSS: Before thin number of valid strata (StrClass keyword required)" = " BNumSS" ,
478492 " BRDen: Before thin relative density (Curtis 1982)" = " BRDen" ,
479493 " BRDen2: Before thin relative density, SILVAH (Marquis and Ernst 1992)" = " BRDen2" ,
480494 " BSClass: Before thin stand structural classification (StrClass keyword required)" = " BSClass" ,
495+ " BSawBio: Before thin sawlog biomass" = " BSawBio" ,
496+ " BSawCrb: Before thin sawlog carbon" = " BSawCrb" ,
497+ " BSCuFt: Before thin sawlog cubic foot volume" = " BSCuFt" ,
481498 " BSDI: Before thin stand density index" = " BSDI" ,
482499 " BSDI2: Before thin stand density index (based on Zeide 1983)" = " BSDI2" ,
483500 " BSDIMax: Before thin maximum stand density index" = " BSDIMax" ,
484501 " BStrDbh: Before thin dbh of the stand uppermost stratum (StrClass keyword required)" = " BStrDbh" ,
485- " BTCuFt: Before thin total (western variants) or merchantable (pulpwood + sawtimber, eastern variants) cubic foot volume" = " BTCuFt" ,
502+ " BTCuFt: Before thin total cubic foot volume" = " BTCuFt" ,
486503 " BTopHt: Before thin top height" = " BTopHt" ,
487504 " BTPA: Before thin trees/acre" = " BTPA" ,
488505 " CEndYear: Year at end of cycle" = " CEndYear" ,
@@ -512,28 +529,46 @@ mkVarList <- function (globals)
512529 " Yes: The constant 1" = " Yes" ,
513530 " AADBH: After thin average DBH" = " AADBH" ,
514531 " ABA: After thin basal area" = " ABA" ,
515- " ABdFt: After thin board foot (western variants) sawtimber (eastern variants) volume" = " ABdFt" ,
532+ " ABdFt: After thin board foot volume" = " ABdFt" ,
533+ " AAbvBio: After thin above ground biomass" = " AAbvBio" ,
534+ " AAbvCrb: After thin above ground carbon" = " AAbvCrb" ,
516535 " ACanCov: After thin percent canopy cover (StrClass keyword required)" = " ACanCov" ,
517536 " ACCF: After thin CCF" = " ACCF" ,
518537 " ADBHwtBA: After thin average DBH weighted by stand basal area" = " ADBHwtBA" ,
519- " AHTWTBA: After thin average height weighted by stand basal area" = " AHTWTBA" ,
538+ " AFolBio: After thin foliar biomass" = " AFolBio" ,
539+ " AFolCrb: After thin foliar carbon" = " AFolCrb" ,
540+ " AHTWTBA: After thin average height weighted by stand basal area (Lorey's Height)" = " AHTWTBA" ,
520541 " AMaxHS: After thin height of tallest tree in uppermost stratum (StrClass keyword required)" = " AMaxHS" ,
521- " AMCuFt: After thin merchantable (western variants) sawtimber (eastern variants) cubic foot volume" = " AMCuFt" ,
542+ " AMerBio: After thin merchantable biomass" = " AMerBio" ,
543+ " AMerCrb: After thin merchantable carbon" = " AMerCrb" ,
544+ " AMCuFt: After thin merchantable cubic foot volume" = " AMCuFt" ,
522545 " AMinHS: After thin height of shortest tree in uppermost stratum (StrClass keyword required)" = " AMinHS" ,
523546 " ANumSS: After thin number of valid strata (StrClass keyword required)" = " ANumSS" ,
524547 " ARDEN: After thin relative density (Curtis 1982)" = " ARDEN" ,
525548 " ARDen2: After thin relative density, SILVAH (Marquis and Ernst 1992)" = " ARDen2" ,
526549 " ASClass: After thin stand structural classification (StrClass keyword required)" = " ASClass" ,
550+ " ASawBio: After thin sawlog biomass" = " ASawBio" ,
551+ " ASawCrb: After thin sawlog carbon" = " ASawCrb" ,
552+ " ASCuFt: After thin sawlog cubic foot volume" = " ASCuFt" ,
527553 " ASDI: After thin stand density index" = " ASDI" ,
528554 " ASDI2: After thin stand density index (based on Zeide 1983)" = " ASDI2" ,
529555 " ASDIMax: After thin maximum stand density index" = " ASDIMax" ,
530556 " AStrDbh: After thin dbh of the stand uppermost stratum (StrClass keyword required)" = " AStrDbh" ,
531- " ATCuFt: After thin total (western variants) or merchantable (pulpwood + sawtimber, eastern variants) cubic foot volume" = " ATCuFt" ,
557+ " ATCuFt: After thin total cubic foot volume" = " ATCuFt" ,
532558 " ATopHt: After thin top height" = " ATopHt" ,
533559 " ATPA: After thin trees/acre" = " ATPA" ,
534560 " Cut: Cutting flag: 0 if no cutting, 1 otherwise" = " Cut" ,
561+ " RAbvBio: Removed above ground biomass" = " RAbvBio" ,
562+ " RAbvCrb: Removed above ground carbon" = " RAbvCrb" ,
535563 " RBdFt: Removed board feet volume" = " RBdFt" ,
536- " RMCuFt: Removed merch cubic feet volume" = " RMCuFt" ,
564+ " RFolBio: Removed Foliar biomass" = " RFolBio" ,
565+ " RFolCrb: Removed Foliar carbon" = " RFolCrb" ,
566+ " RMCuFt: Removed merchantible cubic feet volume" = " RMCuFt" ,
567+ " RMerBio: Removed merchantable biomass" = " RMerBio" ,
568+ " RMerCrb: Removed merchantable carbon" = " RMerCrb" ,
569+ " RSawBio: Removed sawlog biomass" = " RSawBio" ,
570+ " RSawCrb: Removed sawlog carbon" = " RSawCrb" ,
571+ " RSCuFt: Removed sawlog cubic foot volume" = " RSCuFt" ,
537572 " RTCuFt: Removed total cubic feet volume" = " RTCuFt" ,
538573 " RTPA: Removed trees/acre" = " RTPA" ,
539574 " ACC: Accreation form last cycle" = " ACC" ,
@@ -681,7 +716,7 @@ mkFreeformEltList <- function (globals,input,prms,title,kwds)
681716 tags $ style(type = " text/css" ,
682717 " #freeEditCols{font-family:monospace;font-size:90%;width:95%;}" ),
683718 tags $ p(id = " freeEditCols" ,
684- HTML(paste0(" " ,paste0(" ....+...." ,1 : 8 ,collapse = " " )))),
719+ HTML(paste0(" " ,paste0(" ....+...." ,1 : 12 ,collapse = " " )))),
685720 tags $ style(type = " text/css" ,
686721 " #freeEdit{font-family:monospace;font-size:90%;width:100%;cursor:auto;}" ),
687722 tags $ script(paste0(' $(document).ready(function(){ $("textarea").on("focus",' ,
0 commit comments