(v0.7.1.9062) mo/ab assignment improvements

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-08-26 16:02:03 +02:00
1 parent 13d4fef801
commit 7a6fce4eb8
19 files changed
+383 -378

No files matched your search

+11 -11
View File
@@ -287,14 +287,6 @@ as.data.frame.ab <- function (x, ...) {
attributes(y) <- attributes(x)
y
}
#' @exportMethod [<-.ab
#' @export
#' @noRd
"[<-.ab" <- function(value) {
y <- NextMethod()
attributes(y) <- attributes(value)
y
}
#' @exportMethod [[.ab
#' @export
#' @noRd
@@ -303,13 +295,21 @@ as.data.frame.ab <- function (x, ...) {
attributes(y) <- attributes(x)
y
}
#' @exportMethod [<-.ab
#' @export
#' @noRd
"[<-.ab" <- function(i, j, ..., value) {
y <- NextMethod()
attributes(y) <- attributes(i)
class_integrity_check(y, "antimicrobial code", AMR::antibiotics$ab)
}
#' @exportMethod [[<-.ab
#' @export
#' @noRd
"[[<-.ab" <- function(i, j, ..., value) {
y <- NextMethod()
attributes(y) <- attributes(value)
y
attributes(y) <- attributes(i)
class_integrity_check(y, "antimicrobial code", AMR::antibiotics$ab)
}
#' @exportMethod c.ab
#' @export
@@ -317,7 +317,7 @@ as.data.frame.ab <- function (x, ...) {
c.ab <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
class_integrity_check(y, "antimicrobial code", AMR::antibiotics$ab)
}
#' @importFrom pillar type_sum