-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement weights
argument for slab()
#229
Comments
Moving some specific content over from #3. It is on my list. I think that a full re-write based on From #3
|
Note to consider option of supplying weights as a character vector length 1 column name (implemented in #258), or as a vector equal in length to number of profiles. |
Yes: the original implementation (2008?) allowed for site-level or horizon-level weights. It wasn't entirely clear to me at the time how to implement horizon-level weighting into things like weighted SD over intervals > 1cm thickness. I'd prefer that the updates as part of this issue and related PR implement site-level weighted first, via named column from site. Once the details of horizon-level weighting are determined, then I'd prefer to use a similar approach via named column from horizons. |
This is done |
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
* Add an explicit tests of overlapping horizons * Fix dice() link in segment() docs * Updates to `slab()` - closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function) * `slab()`: pass thru `byhz` * Slab tests * Add internal replacement genSlabLabels for testing * cleanup * Add `suppressWarnings()` for `data.table::melt()` * Fix errors from misspecified formula * standardize data.frame conversion * use alternate name to avoid NSE collision with `"wt"` * Add comments for .genSlabLabels2 * Fix segment docs * Add comments for data.table weighted slab aggregation * convert to data.table - need to refactor slab functions so that a single call is possible for weighted/unweighted/numeric/factor * Fix cpm arg in donttest perturb() example * Docs, removing old TODO * Fix for dice() related to SPCs with horizon designation name set * Update slab-factor-eval.R * Add slab-factor-2x.rds * `dice()`: fillHzGaps recalculates hzID and sets it as `hzidname()` - need to recalculate local var to avoid errors * slab: update cpm=2 comparison * slab: add cpm=2 comparison
A planned feature for
slab()
is to (re-)support site-level weights. See #3When specifying some dummy weights the following error message is issued
Example use case:
See ncss-tech/soilDB#194 for some sample DMU record IDs for weighted average aggregation and validation against Web Soil Survey aggregation
The text was updated successfully, but these errors were encountered: