mat_coursegrain | R Documentation |
Course grain a matrix for plotting
mat_coursegrain(
RM,
target_height = round(NROW(RM)/2),
target_width = round(NCOL(RM)/2),
summary_func = NA,
recurrence_threshold = NA,
categorical = NA,
output_type = 0,
n_core = 1,
silent = FALSE
)
RM |
A (recurrence) matrix |
target_height |
How many rows? (default = |
target_width |
How many columns? (default = |
summary_func |
How to summarise the values in subset |
recurrence_threshold |
For a binary matrix the mean of the cells to be summarised will vary between |
categorical |
If set to |
output_type |
The output format for |
n_core |
Number of cores for parallel processing. Set to |
silent |
Silt-ish mode (default = |
A coursegrained matrix of size target_width
by target_height
.
This code was inspired by code published in a blog post by Guillaume Devailly on 29-04-2020 (https://gdevailly.netlify.app/post/plotting-big-matrices-in-r/)
# Continuous
RMc1 <- rp(cumsum(rnorm(200)))
rp_plot(RMc1)
RMc2 <- mat_coursegrain(RMc1)
rp_plot(RMc2)
# Binary
RMb1 <- rp(cumsum(rnorm(200)), emRad = NA)
rp_plot(RMb1, plotMeasures = TRUE)
# Reported RQA measures in rp_plot will be based on the full matrix
rp_plot(RMb1, maxSize = 100^2, plotMeasures = TRUE)
# Plotting the coursegrained matrix itself will yield different values
RMb2 <- mat_coursegrain(RMb1)
rp_plot(RMb2, plotMeasures = TRUE)
# Categorical
RMl1 <- rp(y1 = round(runif(100, min = 1, max = 3)), chromatic = TRUE)
rp_plot(RMl1)
RMl2 <- mat_coursegrain(RMl1, categorical = TRUE)
rp_plot(RMl2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.