mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 22:41:52 +02:00
(v1.8.1.9002) fix for table() on MICs
This commit is contained in:
9
R/mic.R
9
R/mic.R
@ -214,13 +214,6 @@ as.double.mic <- function(x, ...) {
|
||||
as.double(gsub("[<=>]+", "", as.character(x), perl = TRUE))
|
||||
}
|
||||
|
||||
#' @method as.integer mic
|
||||
#' @export
|
||||
#' @noRd
|
||||
as.integer.mic <- function(x, ...) {
|
||||
as.integer(gsub("[<=>]+", "", as.character(x), perl = TRUE))
|
||||
}
|
||||
|
||||
#' @method as.numeric mic
|
||||
#' @export
|
||||
#' @noRd
|
||||
@ -231,7 +224,7 @@ as.numeric.mic <- function(x, ...) {
|
||||
#' @method droplevels mic
|
||||
#' @export
|
||||
#' @noRd
|
||||
droplevels.mic <- function(x, exclude = if (any(is.na(levels(x)))) NULL else NA, as.mic = TRUE, ...) {
|
||||
droplevels.mic <- function(x, exclude = if (any(is.na(levels(x)))) NULL else NA, as.mic = FALSE, ...) {
|
||||
x <- droplevels.factor(x, exclude = exclude, ...)
|
||||
if (as.mic == TRUE) {
|
||||
class(x) <- c("mic", "ordered", "factor")
|
||||
|
Reference in New Issue
Block a user