Skip to content

Commit

Permalink
just to trigger CI
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Oct 13, 2023
1 parent d10128f commit a432944
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/data_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ data_merge.data.frame <- function(x, y, join = "left", by = NULL, id = NULL, ver
missing_in_y <- setdiff(by, colnames(y))
stop_message <- c(
"Not all columns specified in `by` were found in the data frames.",
if (length(missing_in_x) > 0) {
if (length(missing_in_x) > 0L) {
paste0("Following columns are in `by` but absent in `x`: ", text_concatenate(missing_in_x))
},
if (length(missing_in_y) > 0) {
if (length(missing_in_y) > 0L) {
paste0("Following columns are in `by` but absent in `y`: ", text_concatenate(missing_in_y))
}
)
Expand Down Expand Up @@ -264,10 +264,10 @@ data_merge.data.frame <- function(x, y, join = "left", by = NULL, id = NULL, ver

# for later sorting
if (join != "bind") {
if (nrow(x) > 0) {
if (nrow(x) > 0L) {
x$.data_merge_id_x <- seq_len(nrow(x))
}
if (nrow(y) > 0) {
if (nrow(y) > 0L) {
y$.data_merge_id_y <- (seq_len(nrow(y))) + nrow(x)
}
}
Expand Down Expand Up @@ -364,10 +364,10 @@ data_merge.list <- function(x, join = "left", by = NULL, id = NULL, verbose = TR
out <- rbind(x, y[match(colnames(x), colnames(y))])
} else {
# add ID for merging
if (nrow(x) > 0) {
if (nrow(x) > 0L) {
x$.data_merge_row <- seq_len(nrow(x))
}
if (nrow(y) > 0) {
if (nrow(y) > 0L) {
y$.data_merge_row <- (nrow(x) + 1):(nrow(x) + nrow(y))
}
by <- intersect(colnames(x), colnames(y))
Expand Down

0 comments on commit a432944

Please sign in to comment.