View source: R/format_helpers.R
as_title | R Documentation |
Make nice plot titles
as_title(x, ...) ## S3 method for class 'formula' as_title(x, ...) ## Default S3 method: as_title( x, capitalize_all = TRUE, excluded = c("is", "are", "vs", "v.s.", "from", "of", "be", "for", "over"), ... ) ## S3 method for class 'fres' as_title(x, ...) ## S3 method for class 'tres' as_title(x, ...)
x |
title content |
... |
pass to other methods |
capitalize_all |
make the first letter cap |
excluded |
exclude making first letter cap, numeric vector |
## Not run: # Display normal title plot_clean(1,1, main = as_title('this is title')) # Only capitalize the first character plot_clean(1,1, main = as_title('this is title', capitalize_all = F)) # What if title is a formula plot_clean(1,1, main = as_title(p[value](beta[1]) < ~.(0.01) ~ ' is significant')) # Display t-statistics plot_clean(1,1) t_stat = get_t(rnorm(10)) title(main=as_title(t_stat)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.