View source: R/utils_S3_plots.R
plot.explorer | R Documentation |
explorer
Creates various plots for an object of class explorer
.
Depending on the specified type, the function can generate plots that show correlations between variables over x, correlations between x values for each variable, or the evolution of variables over x.
## S3 method for class 'explorer'
plot(
x,
type = "var_by_x",
label_size = 4,
signif = FALSE,
method = "pearson",
filter_var = NULL,
id = NULL,
n_row = NULL,
n_col = NULL,
base_size = 13,
return_gg = FALSE,
add_avg = FALSE,
...
)
x |
An object inheriting from class |
type |
Character string or number specifying the type of plot to generate. Available options are:
|
label_size |
Numeric. Size of the labels in the plot. Default is 4. Only works with type 1 and 2. |
signif |
Logical. If |
method |
Character string specifying the method for correlation calculation. Available options are |
filter_var |
Character vector specifying the variables to exclude from the plot. |
id |
Optional unique identifier to filter the evolution type of plot. Default is |
n_row |
Integer specifying the number of rows to use in |
n_col |
Integer specifying the number of columns to use in |
base_size |
Numeric. Base font size for the plot. Default is 13. |
return_gg |
Logical. If |
add_avg |
Logical. If |
... |
Further graphical parameters for future improvements. |
A ggplot object and an invisible data.frame containing the correlation table when type
is "var_by_x"
or "x_by_var"
.
library(flexFitR)
data(dt_potato)
results <- explorer(dt_potato, x = DAP, y = c(Canopy, GLI), id = Plot)
table <- plot(results, label_size = 4, signif = TRUE, n_row = 2)
table
plot(results, type = "x_by_var", label_size = 4, signif = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.