plotTsTile(x, plot.title = NULL, legend.title = NULL, four = TRUE,
loganom = TRUE, square = TRUE, legend = TRUE, trim = TRUE, overall = TRUE, stat = c("median", "mean"))
four = TRUE
, then x
is first divided into a positive and negative bin. Each bin is then further divided into two bins by its mean, yielding a total of four bins. If four=FALSE
, then x
is simply divided into deciles. In either case, each bin has its own assigned color, with colors ranging from dark blue (smallest numbers) through light blue and pink to red. Although four = TRUE
can be useful for any data in which 0 represents a value with special significance, it is especially so for data converted into log-anomalies, i.e., log10(x/xbar)
where xbar = mean(x, na.rm=TRUE)
. The mean month then has value 0, and a value of -1, for example, indicates original data equal to one-tenth the mean. Log-anomaly transforms can be particularly appropriate for biological populations, in which variability is often approximately proportional to the mean.
When loganom = TRUE
, the anomalies are calculated with respect to the overall mean month. This differs from, for example, the log-anomaly zooplankton plot of O'Brien et al. (2008), in which a monthly anomaly is calculated with respect to the mean value of the same month. To get the latter behavior, set overall = FALSE
. A further option is to set stat = "median"
rather than the default stat = "mean"
, in which case xbar = median(x, na.rm = TRUE)
, and the positive and negative bins are each divided into two bins by their median instead of mean. Using combinations of these different options can reveal complementary information.
You may want to set square = FALSE
and then adjust the plot window manually if you plan to use the plot in a subsequent layout or if there is too much white space.
# plot log-anomalies in four bins
chl27 = sfbayChla[, 's27']
plotTsTile(chl27, legend.title = 'Chl log-anomaly')
# plot deciles
plotTsTile(chl27, plot.title = 'SF Bay station 27', legend.title =
'chlorophyll', four = FALSE, loganom = FALSE, square = FALSE)
Run the code above in your browser using DataLab