Closed JimboMahoney closed 3 years ago
I just test it on Windows 10, MacOS 10.14.6 & Ubuntu 18.04. All three behave as expected (with one line return in the first case and two line returns in the second one). Could you, please, provide more information about your configuration? Could you also test msg_box("Test\nTest2")
.
Hi Philippe,
Many thanks for replying - sorry for the lack of information - I wasn't sure what would help.
I'm on Windows 10, using RStudio.
msg_box("Test\nTest2")
also results in no new line.
Here's the output from sessioninfo:
sessionInfo()
R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages: [1] tcltk stats graphics grDevices utils datasets methods base
other attached packages: [1] fANCOVA_0.5-1 readxl_1.3.1 caTools_1.17.1.3 svDialogs_1.0.0 tcltk2_1.2-11
[6] forcats_0.4.0 stringr_1.4.0 dplyr_0.8.3 purrr_0.3.3 readr_1.3.1
[11] tidyr_1.0.0 tibble_2.1.3 ggplot2_3.2.1 tidyverse_1.3.0 PerformanceAnalytics_1.5.3 [16] quantmod_0.4-15 TTR_0.23-5 xts_0.11-2 zoo_1.8-6loaded via a namespace (and not attached): [1] tidyselect_0.2.5 haven_2.2.0 lattice_0.20-38 colorspace_1.4-1 vctrs_0.2.0 generics_0.0.2 rlang_0.4.2 pillar_1.4.2
[9] svGUI_1.0.0 glue_1.3.1 withr_2.1.2 DBI_1.0.0 dbplyr_1.4.2 modelr_0.1.5 lifecycle_0.1.0 munsell_0.5.0
[17] gtable_0.3.0 cellranger_1.1.0 rvest_0.3.5 curl_4.3 broom_0.5.2 Rcpp_1.0.3 scales_1.1.0 backports_1.1.5 [25] jsonlite_1.6 fs_1.3.1 hms_0.5.2 stringi_1.4.3 grid_3.6.1 bitops_1.0-6 quadprog_1.5-8 cli_1.1.0
[33] tools_3.6.1 magrittr_1.5 lazyeval_0.2.2 crayon_1.3.4 pkgconfig_2.0.3 zeallot_0.1.0 xml2_1.2.2 reprex_0.3.0
[41] lubridate_1.7.4 assertthat_0.2.1 httr_1.4.1 rstudioapi_0.10 R6_2.4.1 nlme_3.1-142 compiler_3.6.1
Late answer... indeed, this is a limitation of the RStudio dialog box. To use another version that donors line feed, use this:
dlg_message("Test\nTest2", rstudio = FALSE)$res
Hi there!
This is a minor issue, but I cannot get a new line to work in msg_box.
The help suggests that using either a \n or a vector will work, but neither works for me?
e.g.
In both cases, the text appears on the same line.
Any ideas?
Thanks!