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 authored and nathaneastwood committed Aug 14, 2022
1 parent 947de37 commit fec063c
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 fec063c

Please sign in to comment.