Description Usage Arguments Details
Converts an array into a data.frame for plotting with ggplotHelper
1 | array2df(array.in, x.yearmon = T)
|
array.in |
array with data for plotting. If the array contains multiple series, these must be ordered column-wise. |
Returns a dataframe with a "names" column and a "data" column. If the array.in contains multiple columns, these are labeled by a legend in the new data frame corresponding to the column name. Test: array1 <- array(c(1:30), dim = c(10,3), dimnames = list(paste0("Date", 1:10), paste0("Var", 1:3))) ggplotHelper::line_chart(array2df(array1), x = "names", y = "data", group = "legend", legend.names = colnames(array1), legend.position = "top")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.