Skip to content

Commit

Permalink
safer for user specified metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Mar 2, 2021
1 parent 94189c8 commit 26dbb89
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/SoilProfileCollection-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ setMethod(

# filter out missing data, accounting for optional `v`
h <- x@horizons
h <- .data.frame.j(h, target.names, aqp_df_class(x))
x@horizons <- h[complete.cases(h),]
hzdesgnname(x) <- ""
x@horizons <- h[complete.cases(.data.frame.j(h, target.names, aqp_df_class(x))),]

# return the shallowest (of the deepest depths in each profile)
.LAST <- NULL
Expand Down Expand Up @@ -120,9 +118,7 @@ setMethod(

# filter out missing data, accounting for optional `v`
h <- x@horizons
h <- .data.frame.j(h, target.names, aqp_df_class(x))
x@horizons <- h[complete.cases(h),]
hzdesgnname(x) <- ""
x@horizons <- h[complete.cases(.data.frame.j(h, target.names, aqp_df_class(x))),]

# return the deepest (of the deepest depths in each profile)
.LAST <- NULL
Expand Down

0 comments on commit 26dbb89

Please sign in to comment.