Skip to content

Commit

Permalink
or use nzchar
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 12, 2024
1 parent 4cfbe1d commit 8ad0200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/data_to_long.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ data_to_long <- function(data,
header = FALSE
)
names(tmp) <- paste0("V", seq_len(ncol(tmp)))
tmp[tmp == ""] <- NA # nolint
tmp[!nzchar(tmp, keepNA = TRUE)] <- NA_character_

stacked_data$ind <- NULL
stacked_data <- cbind(tmp, stacked_data)
Expand Down

0 comments on commit 8ad0200

Please sign in to comment.