commit | 3e0e2b108e8ee1f91e3d105f576288a6dc38c21f | [log] [tgz] |
---|---|---|
author | Hao Zhu <haozhu233@gmail.com> | Tue Oct 23 11:21:29 2018 -0400 |
committer | Hao Zhu <haozhu233@gmail.com> | Tue Oct 23 11:21:29 2018 -0400 |
tree | 38824654d476988c1065367c4c4b8b2afb8a1679 | |
parent | f64f475502f0673d14b177a1d0ba9c610a05f750 [diff] |
Convert possible factor to character in linebreak
diff --git a/R/linebreak.R b/R/linebreak.R index e090a5e..54d7cae 100644 --- a/R/linebreak.R +++ b/R/linebreak.R
@@ -13,6 +13,7 @@ linebreak <- function(x, align = c("l", "c", "r"), double_escape = F, linebreaker = "\n") { if (is.numeric(x) | is.logical(x)) return(x) + x <- as.character(x) align <- match.arg(align, c("l", "c", "r")) if (double_escape) { ifelse(str_detect(x, linebreaker),