Learn R Programming

RandVar (version 1.2.4)

EuclRandVarList: Generating function for EuclRandVarList-class

Description

Generates an object of class "EuclRandVarList".

Usage

EuclRandVarList(...)

Value

Object of class "EuclRandVarList"

Arguments

...

Objects of class "EuclRandVariable" which shall form the list of Euclidean random variables.

Author

Matthias Kohl Matthias.Kohl@stamats.de

See Also

EuclRandVarList-class

Examples

Run this code
L1 <- list(function(x){x}, function(x){x^2}, function(x){x^3}, function(x){x^4}, 
           function(x){x^5}, function(x){x^6})
L2 <- list(function(x){exp(x)}, function(x){abs(x)}, 
           function(x){sin(x)}, function(x){floor(x)})

R1 <- new("EuclRandVariable", Map = L2, Domain = Reals(), Range = Reals())
R2 <- EuclRandMatrix(Map = L1, ncol = 2, Domain = Reals(), dimension = 1)
R3 <- EuclRandMatrix(Map = L2, ncol = 2, Domain = Reals(), dimension = 1)

(RL1 <- EuclRandVarList(R1, R2, R3))
is(R1, "EuclRandVarList")
as(R1, "EuclRandVarList")
is(R2, "EuclRandVarList")
as(R2, "EuclRandVarList")

Map(exp(RL1)[[1]]) # "Math" group

## "Arith" group
Map((1 + RL1)[[1]])
Map((RL1 * 2)[[2]])
Map((RL1 / RL1)[[3]])

## The function is currently defined as
function(...){ 
    new("EuclRandVarList", list(...)) 
}

Run the code above in your browser using DataLab