| makilabCor | R Documentation |
Creates and exports a correlation matrix in a style consistent with the Maki Lab.
makilabCor(df, x, y, excel_export = FALSE, filename = NULL, sheetname = NULL)
df |
A data frame containing the variables you want to correlate. |
x |
A list of column names for the X axis. |
y |
A list of row names for the Y axis. |
excel_export |
A bool for whether or not you want an excel export. |
filename |
String of the filename to export to. Defaults to 'Data_YYYY-MM-DD.xlsx' where YYYY-MM-DD is today's date. |
sheetname |
A string to be used as the sheet name. Defaults to 'Corri' where i is the number of correlation sheets in the file. |
The table of correlation values.
data(iris)
library(makilab)
makilabCor(df = iris,
x = c("Sepal.Width", "Sepal.Length"),
y = c("Petal.Width", "Petal.Length", "Species")) # No export
makilabCor(df = iris,
x = c("Sepal.Width", "Sepal.Length"),
y = c("Petal.Width", "Petal.Length", "Species"),
excel_export = TRUE) # Exports to excel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.