Skip to content

Commit

Permalink
convert to char if factor
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Aug 3, 2022
1 parent 3b8f361 commit 1f2d19c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/separate.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ separate <- function(
stopifnot(length(col) == 1)
stopifnot(is.character(into))

if (is.numeric(data[[col]])) {
if (is.numeric(data[[col]]) | is.factor(data[[col]])) {
data[[col]] <- as.character(data[[col]])
}

Expand Down

0 comments on commit 1f2d19c

Please sign in to comment.