-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
≥ in rownames #38
Comments
Hi - can you provide a reprex? |
In the example the row name should be Age ≥ 50, but in the plot, it's Age =50. I've seen this problem reported elsewhere with various fixes, but none of them seem to have fixed the issue here. res <- readxl::read_xlsx(path = "ExampleResults.xlsx",
trim_ws = FALSE, sheet = 1)
#> New names:
#> * `` -> ...5
res$`Row %` <- sprintf(round(res$Positive/res$Total*100,1), fmt = "%#.1f")
res$`Row %`[res$`Row %` == "NA"] <- ""
names(res)[5] <- " "
forester::forester(res[,1:5],
estimate = res$`VE %`,
ci_low = res$LowerCI,
ci_high = res$UpperCI,
null_line_at = 100,
xlim = c(0,100),
estimate_col_name = "VE % (CI)",
estimate_precision = 0,
font_family = "sans",
ci_sep = "-",
justify = c(0,1,1,1,1,1),
nudge_height = 0.1,
nudge_width = 0.2,
render_as = "pdf",
file_path = "ExampleForestPlot.pdf"
)
#> [1] 0 Created on 2022-01-24 by the reprex package (v2.0.1) |
We found a workaround for this issue. This way if the ≥ symbol is in the results file, it won't be replaced with just a > symbol in the plots. Still doesn't plot the symbol however, so still work to do here. Encoding(res$Subgroup) <- "UTF-8" # first column
res$Subgroup <- gsub(pattern = \u2265", replacement = ">=", res$Subgroup) |
Is it possible to include the ≥ symbol in rownames? I've tried just including it in the spreadsheet that I read in (resulted in just "=" being printed), using the unicode character (\u2265), and using expression/bquote. None of them worked. Thanks!
The text was updated successfully, but these errors were encountered: