Skip to content

Commit

Permalink
doc fixes, removing old code no longer needed for percent missing calc
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Feb 24, 2021
1 parent 1e15c0e commit e9c63a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
30 changes: 1 addition & 29 deletions R/dice.R
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@

## very slow, and will be retired in favor of a native DT solution
## re-implementation of "percent missing" calculation, should work on any horion set (slice / glom / ?)

# h$.pctMissing <- apply(as.matrix(h[, vars]), 1, function(i, n=length(vars)) length(which(is.na(i))) / n)

#' .pctMissing <- function(h, vars) {
#'
#' m <- as.matrix(
#' aqp:::.data.frame.j(
#' h,
#' col.names = vars
#' )
#' )
#'
#' # if there is only 1 variable, don't try to compute this value
#' # if all data are missing NA is returned
#' res <- apply(
#' m,
#' MARGIN = 1,
#' FUN = function(i, n = length(vars)) {
#' length(which(is.na(i))) / n
#' }
#' )
#'
#' return(res)
#' }



## fairly generic, will be required by (at least):"
# * dice() [x]
Expand All @@ -43,7 +15,7 @@
#' @param x a `SoilProfileCollection` object
#' @param byhz logical, evaluate horizon depth logic at the horizon level (profile level if `FALSE`)
#'
#' @return a `data.frame` object
#' @return a `SoilProfileCollection` object
#'
#' @export
#'
Expand Down
2 changes: 1 addition & 1 deletion man/HzDepthLogicSubset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9c63a5

Please sign in to comment.