R: Iterate over (N+1)D field and get all LC configurations
data2LCs
R Documentation
Iterate over (N+1)D field and get all LC configurations
Description
data2LCs gets all PLC or FLC configuration from a
(N+1)D field given the LC template. The shape and
dimension of this LC template depends on coordinates
passed on by setup_LC_geometry.
User-defined LC template
Since data2LCs passes the LC.coordinates
array to get_LC_config to iterate over the
entire dataset, this functional programming approach
allows user-defined light cone shapes (independent of the
shapes implemented by setup_LC_geometry).
Just replace the $coordinates from the "LC"
class with a user-specified LC template.
spatio-temporal field; either a matrix or a
3-dimensional array with time t as the first
dimension, and the spatial coordinates as subsequent
dimensions. Make sure to check
compute_LC_coordinates for correct
formatting.
LC.coordinates
coordinates for LC shape and
dimension (usually the $coordinates value from the
"LC" class; but also user-defined coordinates are
possible here).
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(LICORS)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LICORS/data2LCs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: data2LCs
> ### Title: Iterate over (N+1)D field and get all LC configurations
> ### Aliases: data2LCs
> ### Keywords: manip
>
> ### ** Examples
>
> set.seed(1)
> AA <- matrix(rnorm(200), ncol = 10)
> LC_geom <- setup_LC_geometry(speed = 1, horizon = list(PLC = 2, FLC = 0), shape = "cone")
> bb <- data2LCs(t(AA), LC.coordinates = LC_geom$coordinates)
> image2(bb$PLC)
> plot(density(bb$FLC))
>
> # a time series example
> data(nottem)
> xx <- nottem
> LC_geom <- setup_LC_geometry(speed = 1, horizon = list(PLC = 24, FLC = 3), space.dim = 0)
> bb <- data2LCs(xx, LC.coordinates = LC_geom$coordinates)
> image2(bb$PLC)
> plot(density(bb$FLC))
>
>
>
>
>
> dev.off()
null device
1
>