The brainstorm
package houses personal utility functions which I reuse in my R scripts. Please see some examples below.
library(brainstorm)
The brainstorm
package contains my default settings for efficiently plotting tables in Excel worksheets (using the openxlsx
package). In the following example, we consider the classic iris
dataset using the add_worksheet()
function, which itself depends upon several subfunctions. If the user desires finer control, these subfunctions could be called individually and in succession, and the default values for each of the arguments could thereby be modified.
# load package library(openxlsx) # create workbook wb = createWorkbook() sheet = "Iris Data" # call function add_worksheet(wb, sheet, iris) # save workbook saveWorkbook(wb, "Iris Data.xlsx", overwrite = TRUE)
The resulting example file can be downloaded below.
xfun::embed_file("Iris Data.xlsx")
show_table()
is a utility function to show interactive tables within a markdown document, as shown below.
# show table show_table(iris, height = "150px")
Further, inspired by this GitHub issue, the repository for this package contains my custom CSS file for the R Markdown cayman
theme in prettydoc
, available for download below.
xfun::embed_file("../css/custom.css")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.