Description Usage Arguments Value References Examples
The function csa computes (and by default plots) the aggregation curve of a given statistic in two dimensions, e.g., space.
| 1 2 3 4 5 6 7 8 9 | 
| x | A raster or brick object. | 
| stat | The statistic which will be estimated across the cross-scale continuum. Suitable options are: 
 | 
| std | logical. If TRUE (the default) the CSA plot is standardized to unit, i.e., zero mean and unit variance in the original time scale. | 
| plot | logical. If TRUE (the default) the CSA plot is printed | 
| threshold | numeric. Sample size of the time series at the last aggregated scale. | 
| chk | logical. If TRUE the number of cores is limited to 2. | 
| ... | log_x and log_y (default TRUE) for setting the axes of the CSA plot to logarithmic scale. The argument wn (default FALSE) is used to plot a line presenting the standardized variance of the white noise process. Therefore, it should be used only with stat = "var" and std = T. | 
If plot = TRUE, the csa returns a list containing:
values: Matrix of the timeseries values for the selected stat at each scale.
plot: Plot of scale versus stat as a ggplot object.
If plot = FALSE, then it returns only the matrix of the timeseries values for the selected stat at each scale.
Markonis et al., A cross-scale analysis framework for model/data comparison and integration, Geoscientific Model Development, Submitted.
| 1 2 3 4 5 6 7 8 9 10 | data(gpm_events)
event_dates <- format(gpm_events[, unique(time)], "%d-%m-%Y")
gpm_events_brick <- dt.to.brick(gpm_events, var_name = "prcp")
plot(gpm_events_brick, col = rev(colorspace::sequential_hcl(40)),
     main = event_dates)
csas(gpm_events_brick)
gpm_sp_scale <- csas(gpm_events_brick, plot = FALSE)
gpm_sp_scale[, variable := factor(variable, labels = event_dates)]
csa.multiplot(gpm_sp_scale, smooth = TRUE, log_x = FALSE, log_y = FALSE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.