diff --git a/DESCRIPTION b/DESCRIPTION
index bee4363b..5d3a85e8 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.2.0.9001
+Version: 1.2.0.9002
Date: 2020-06-03
Title: Antimicrobial Resistance Analysis
Authors@R: c(
diff --git a/NEWS.md b/NEWS.md
index 94b06cfa..048dc9b3 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# AMR 1.2.0.9001
+# AMR 1.2.0.9002
## Last updated: 03-Jun-2020
### Changed
diff --git a/R/join_microorganisms.R b/R/join_microorganisms.R
index f940ae56..afcb3823 100755
--- a/R/join_microorganisms.R
+++ b/R/join_microorganisms.R
@@ -57,7 +57,7 @@ inner_join_microorganisms <- function(x, by = NULL, suffix = c("2", ""), ...) {
check_dataset_integrity()
check_groups_before_join(x, "inner_join_microorganisms")
checked <- joins_check_df(x, by)
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
x <- checked$x
by <- checked$by
join <- suppressWarnings(
@@ -76,7 +76,7 @@ left_join_microorganisms <- function(x, by = NULL, suffix = c("2", ""), ...) {
check_dataset_integrity()
check_groups_before_join(x, "left_join_microorganisms")
checked <- joins_check_df(x, by)
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
x <- checked$x
by <- checked$by
join <- suppressWarnings(
@@ -95,7 +95,7 @@ right_join_microorganisms <- function(x, by = NULL, suffix = c("2", ""), ...) {
check_dataset_integrity()
check_groups_before_join(x, "right_join_microorganisms")
checked <- joins_check_df(x, by)
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
x <- checked$x
by <- checked$by
join <- suppressWarnings(
@@ -114,7 +114,7 @@ full_join_microorganisms <- function(x, by = NULL, suffix = c("2", ""), ...) {
check_dataset_integrity()
check_groups_before_join(x, "full_join_microorganisms")
checked <- joins_check_df(x, by)
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
x <- checked$x
by <- checked$by
join <- suppressWarnings(
@@ -132,7 +132,7 @@ full_join_microorganisms <- function(x, by = NULL, suffix = c("2", ""), ...) {
semi_join_microorganisms <- function(x, by = NULL, ...) {
check_dataset_integrity()
check_groups_before_join(x, "semi_join_microorganisms")
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
checked <- joins_check_df(x, by)
x <- checked$x
by <- checked$by
@@ -149,7 +149,7 @@ anti_join_microorganisms <- function(x, by = NULL, ...) {
check_dataset_integrity()
check_groups_before_join(x, "anti_join_microorganisms")
checked <- joins_check_df(x, by)
- x_class <- class(x)
+ x_class <- get_prejoined_class(x)
x <- checked$x
by <- checked$by
join <- suppressWarnings(
@@ -190,6 +190,14 @@ joins_check_df <- function(x, by) {
by = joinby)
}
+get_prejoined_class <- function(x) {
+ if (is.data.frame(x)) {
+ class(x)
+ } else {
+ "data.frame"
+ }
+}
+
check_groups_before_join <- function(x, fn) {
if (is.data.frame(x) && !is.null(attributes(x)$groups)) {
warning("Groups are dropped, since the ", fn, "() function relies on merge() from base R, not on join() from dplyr.", call. = FALSE)
diff --git a/docs/404.html b/docs/404.html
index 59e1de27..8e486d95 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
NEWS.md
-