From 9bd9005eaca3b4d343833d84facfdcf67db7c9b6 Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Thu, 25 Jan 2024 21:06:17 -0800 Subject: [PATCH] texcl_to_ssc: fix row names --- R/texture.R | 5 ++--- man/texture.Rd | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/texture.R b/R/texture.R index 041e3a8ec..6be5cb168 100644 --- a/R/texture.R +++ b/R/texture.R @@ -247,7 +247,6 @@ texcl_to_ssc <- function(texcl = NULL, clay = NULL, sample = FALSE) { }) ->.; do.call("rbind", .) -> df df$silt <- 100 - df$clay - df$sand - row.names(df) <- NULL } @@ -256,12 +255,12 @@ texcl_to_ssc <- function(texcl = NULL, clay = NULL, sample = FALSE) { df <- df[(order(as.integer(df$rn))), vars] df$rn <- NULL df$texcl <- NULL - + rownames(df) <- NULL return(df) } #' Convert sand, silt and clay to texture class -#' @param simplify Passed to `SoilTextureLevels()` to set the nu mber of possible texture classes. If `TRUE`, the ordered factor has a maximum of 12 levels, if `FALSE` (default) the ordered factor has a maximum of 21 levels (including e.g. very fine/fine/coarse variants) +#' @param simplify Passed to `SoilTextureLevels()` to set the number of possible texture classes. If `TRUE`, the ordered factor has a maximum of 12 levels, if `FALSE` (default) the ordered factor has a maximum of 21 levels (including e.g. very fine/fine/coarse variants) #' @rdname texture #' @return - `ssc_to_texcl`: A `character` vector containing texture class #' @export diff --git a/man/texture.Rd b/man/texture.Rd index ae336c10e..a1cc39446 100644 --- a/man/texture.Rd +++ b/man/texture.Rd @@ -59,7 +59,7 @@ conventions (e.g. c|C, sil|SIL, sl|SL, cos|COS)} \item{sand}{vector of sand percentages} -\item{simplify}{Passed to \code{SoilTextureLevels()} to set the nu mber of possible texture classes. If \code{TRUE}, the ordered factor has a maximum of 12 levels, if \code{FALSE} (default) the ordered factor has a maximum of 21 levels (including e.g. very fine/fine/coarse variants)} +\item{simplify}{Passed to \code{SoilTextureLevels()} to set the number of possible texture classes. If \code{TRUE}, the ordered factor has a maximum of 12 levels, if \code{FALSE} (default) the ordered factor has a maximum of 21 levels (including e.g. very fine/fine/coarse variants)} \item{as.is}{logical: should character vectors be converted to factors? (default: TRUE)}