The "LSC" class lies at the core of this package
as it describes spatio-temporal patterns in the data. It
is usually an array with the same spatio-temporal
resolution as the original dataset.
plot.LSC plots LSC of (1+1)D and
(2+1)D systems.
plot_LSC_1plus1D plots LSC for a (1+1)D
field.
plot_LSC_2plus1D plots LSC for a (2+1)D
field.
plot_LSC_0plus1D plots LSC for a (0+1)D
field, i.e., a time series.
Usage
## S3 method for class 'LSC'
plot(x, ...)
plot_LSC_1plus1D(z, col = NULL, lsc.unit = "bits", heights = c(2, 5), widths = c(5,
2))
plot_LSC_2plus1D(z, type = "temporal", time.frames = NULL, zlim = NULL, heights = NULL,
lsc.unit = "bits", data = NULL, col = NULL)
plot_LSC_0plus1D(z, col = NULL, lsc.unit = "bits", ...)
Arguments
x
an object of class "LSC"
...
optional arguments passed to
plot_LSC_2plus1D or
plot_LSC_1plus1D.
widths
passed to layout
for dividing the plotting region horizontally. A vector
of length 2: image (left) & temporal average (right)
z
an object of class "LSC"
type
a "temporal" or a "spatial"
summary plot of LSC
time.frames
a vector of length ≤q 6 to
indicate what frames should be displayed (only for
type = "temporal"). If NULL (default) then
it chooses them automatically based on valleys and peaks
in the spatial average LSC.
zlim
minimum and maximum z values for which colors
should be plotted, defaulting to the range of the finite
values of z.
lsc.unit
character string (default: "bits")
to write next to the color legend
col
colors: either a string decribing a pallette
from the RColorBrewer package (see also
http://colorbrewer2.org/), or a list of colors (see
image for suggestions).
data
(optional) original data to compare to LSC
(relevant only for type = "spatial")
heights
passed to layout
for dividing the plotting region vertically. If
data = NULL a vector of length 2; otherwise a
vector of length 3.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LSC)
Loading required package: LICORS
Loading required package: RColorBrewer
Loading required package: fields
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: 'spam'
The following objects are masked from 'package:base':
backsolve, forwardsolve
Loading required package: maps
# maps v3.1: updated 'world': all lakes moved to separate new #
# 'lakes' database. Type '?world' or 'news(package="maps")'. #
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.12
Loading required package: Matrix
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LSC/LSC-utils.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LSC-utils
> ### Title: Utilities for LSC class
> ### Aliases: LSC-utils plot.LSC plot_LSC_0plus1D plot_LSC_1plus1D
> ### plot_LSC_2plus1D
> ### Keywords: hplot
>
> ### ** Examples
>
> ## Not run:
> ##D data(contCA00)
> ##D
> ##D temp_lsc <- states2LSC(states = contCA00$predictive_states -
> ##D min(contCA00$predictive_states) + 1)
> ##D class(temp_lsc) <- c("LSC", "LSC_1plus1D")
> ##D plot_LSC_1plus1D(temp_lsc)
> ## End(Not run)
> ## Not run:
> ##D data(contCA00)
> ##D
> ##D temp_lsc <- states2LSC(states = contCA00$predictive_states -
> ##D min(contCA00$predictive_states) + 1)
> ##D temp_lsc_3D <- array(temp_lsc, dim = c(25, 20, 40))
> ##D class(temp_lsc_3D) <- c("LSC", "LSC_2plus1D")
> ##D plot_LSC_2plus1D(temp_lsc_3D, type = "temporal")
> ##D plot_LSC_2plus1D(temp_lsc_3D, type = "spatial")
> ## End(Not run)
> state.sim <- rpois(100, 1)
>
> lsc.est <- states2LSC(states = state.sim)
> class(lsc.est) <- c("LSC", "LSC_0plus1D")
> plot_LSC_0plus1D(lsc.est)
>
> weights.sim <- matrix(runif(1000, 0, 1), ncol = 10)
> weights.sim <- normalize(weights.sim)
> lsc.est <- states2LSC(weight.matrix = weights.sim)
> plot_LSC_0plus1D(lsc.est)
>
>
>
>
>
> dev.off()
null device
1
>