strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science
https://strengejacke.github.io/sjPlot
607 stars 91 forks source link

sjt.frq incorrectly writes row label in file output #509

Open CSUMB-IAR opened 5 years ago

CSUMB-IAR commented 5 years ago

When a row label contains the string 'arc' writes 'background-color:#eaeaea;' in the HTML file output. Example: 'Research' displays on the webpage as 'Resebackground-color:#eaeaea;h' This issue does not manifest itself in RStudio's builtin viewer. And the cell looks fine in the source dataframe.

function call:

sjt.frq(csumbes_Q85$Q85, title = "Q85: Have you previously had help in any of the following areas?" , show.summary = T, show.skew = F, show.kurtosis = F, skip.zero = T, file = paste0(resultsFolder,"tables_Q85.html"), altr.row.col = F, digits = 1, encoding = "UTF-8", CSS = list(css.table = 'border:2px solid black;', css.lasttablerow = 'border-bottom: 1px dotted blue;', css.summary = 'font-weight:bold;'), ignore.strings = FALSE, auto.grp.strings = FALSE, string.na = "" )

session / environment details:

sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] sjmisc_2.3.1 sjPlot_2.3.1 reshape2_1.4.2 loaded via a namespace (and not attached): [1] Rcpp_1.0.0 stringdist_0.9.4.4 mvtnorm_1.0-6 lattice_0.20-33 tidyr_0.8.2 zoo_1.7-14 lmtest_0.9-35 [8] assertthat_0.2.0 digest_0.6.12 psych_1.6.12 mime_0.5 R6_2.3.0 plyr_1.8.4 stats4_3.3.0 [15] coda_0.19-1 ggplot2_3.0.0 pillar_1.3.1 rlang_0.3.1 multcomp_1.4-6 lazyeval_0.2.0 rstudioapi_0.7 [22] minqa_1.2.4 nloptr_1.0.4 Matrix_1.2-6 DT_0.4 splines_3.3.0 lme4_1.1-12 stringr_1.3.0 [29] foreign_0.8-66 htmlwidgets_1.2 munsell_0.4.3 shiny_1.0.5 broom_0.4.2 httpuv_1.4.1 modelr_0.1.1 [36] pkgconfig_2.0.2 mnormt_1.5-5 htmltools_0.3.6 nnet_7.3-12 tidyselect_0.2.5 tibble_2.0.1 coin_1.1-3 [43] codetools_0.2-14 crayon_1.3.4 dplyr_0.7.8 later_0.7.1 MASS_7.3-48 grid_3.3.0 nlme_3.1-127 [50] arm_1.9-3 xtable_1.8-2 gtable_0.2.0 magrittr_1.5 scales_0.5.0 stringi_1.1.7 promises_1.0.1 [57] bindrcpp_0.2.2 effects_3.1-2 sandwich_2.3-4 TH.data_1.0-8 blme_1.0-4 tools_3.3.0 forcats_0.3.0 [64] glue_1.3.0 purrr_0.2.4 sjstats_0.9.0 survival_2.40-1 abind_1.4-5 parallel_3.3.0 yaml_2.1.14 [71] colorspace_1.3-2 knitr_1.20 bindr_0.1.1 haven_1.1.1 modeltools_0.2-21 merTools_0.3.0

  | >

strengejacke commented 5 years ago

Yes, this is due to replacement of CSS tags when creating a HTML file that can be used in Word etc. arc is one CSS tag, which should be renamed.