[Robast-commits] r933 - in pkg/RandVar: inst man tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Apr 23 09:31:16 CEST 2017
Author: stamats
Date: 2017-04-23 09:31:15 +0200 (Sun, 23 Apr 2017)
New Revision: 933
Modified:
pkg/RandVar/inst/NEWS
pkg/RandVar/man/0RandVar-package.Rd
pkg/RandVar/tests/tests.Rout.save
Log:
minor updates
Modified: pkg/RandVar/inst/NEWS
===================================================================
--- pkg/RandVar/inst/NEWS 2017-04-23 07:21:11 UTC (rev 932)
+++ pkg/RandVar/inst/NEWS 2017-04-23 07:31:15 UTC (rev 933)
@@ -8,6 +8,16 @@
information)
#######################################
+version 1.0.1
+#######################################
+
+user-visible CHANGES:
++ update of Natalyias email
+
+under the hood:
++ use of Authors at R in DESCRIPTION file
+
+#######################################
version 1.0
#######################################
@@ -113,4 +123,4 @@
+ use of on.exit() to restore old settings for options() and par() at the end
of functions
+ introduction of NEWS-file
-+ update of CITATION-file (based on code provided by A. Zeileis on R help)
\ No newline at end of file
++ update of CITATION-file (based on code provided by A. Zeileis on R help)
Modified: pkg/RandVar/man/0RandVar-package.Rd
===================================================================
--- pkg/RandVar/man/0RandVar-package.Rd 2017-04-23 07:21:11 UTC (rev 932)
+++ pkg/RandVar/man/0RandVar-package.Rd 2017-04-23 07:31:15 UTC (rev 933)
@@ -12,7 +12,7 @@
\tabular{ll}{
Package: \tab RandVar \cr
Version: \tab 1.0.1 \cr
-Date: \tab 2017-04-22 \cr
+Date: \tab 2017-04-24 \cr
Depends: \tab R (>= 2.14.0), methods, distr(>= 2.5.2), distrEx(>=
2.5)\cr
Imports: \tab startupmsg \cr
Modified: pkg/RandVar/tests/tests.Rout.save
===================================================================
--- pkg/RandVar/tests/tests.Rout.save 2017-04-23 07:21:11 UTC (rev 932)
+++ pkg/RandVar/tests/tests.Rout.save 2017-04-23 07:31:15 UTC (rev 933)
@@ -1,1978 +1,1986 @@
-
-R Under development (unstable) (2016-04-22 r70532) -- "Unsuffered Consequences"
-Copyright (C) 2016 The R Foundation for Statistical Computing
-Platform: i386-w64-mingw32/i386 (32-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(RandVar)
-Loading required package: distr
-Loading required package: startupmsg
-:startupmsg> Utilities for Start-Up Messages (version 0.9.3)
-:startupmsg>
-:startupmsg> For more information see ?"startupmsg",
-:startupmsg> NEWS("startupmsg")
-
-Loading required package: sfsmisc
-Loading required package: SweaveListingUtils
-:SweaveListingUtils> Utilities for Sweave Together with
-:SweaveListingUtils> TeX 'listings' Package (version
-:SweaveListingUtils> 0.7.3)
-:SweaveListingUtils>
-:SweaveListingUtils> NOTE: Support for this package
-:SweaveListingUtils> will stop soon.
-:SweaveListingUtils>
-:SweaveListingUtils> Package 'knitr' is providing the
-:SweaveListingUtils> same functionality in a better
-:SweaveListingUtils> way.
-:SweaveListingUtils>
-:SweaveListingUtils> Some functions from package 'base'
-:SweaveListingUtils> are intentionally masked ---see
-:SweaveListingUtils> SweaveListingMASK().
-:SweaveListingUtils>
-:SweaveListingUtils> Note that global options are
-:SweaveListingUtils> controlled by
-:SweaveListingUtils> SweaveListingoptions() ---c.f.
-:SweaveListingUtils> ?"SweaveListingoptions".
-:SweaveListingUtils>
-:SweaveListingUtils> For more information see
-:SweaveListingUtils> ?"SweaveListingUtils",
-:SweaveListingUtils> NEWS("SweaveListingUtils")
-:SweaveListingUtils> There is a vignette to this
-:SweaveListingUtils> package; try
-:SweaveListingUtils> vignette("ExampleSweaveListingUtils").
-
-
-Attaching package: 'SweaveListingUtils'
-
-The following objects are masked from 'package:base':
-
- library, require
-
-:distr> Object Oriented Implementation of Distributions (version
-:distr> 2.6)
-:distr>
-:distr> Attention: Arithmetics on distribution objects are
-:distr> understood as operations on corresponding random variables
-:distr> (r.v.s); see distrARITH().
-:distr>
-:distr> Some functions from package 'stats' are intentionally masked
-:distr> ---see distrMASK().
-:distr>
-:distr> Note that global options are controlled by distroptions()
-:distr> ---c.f. ?"distroptions".
-:distr>
-:distr> For more information see ?"distr", NEWS("distr"), as well as
-:distr> http://distr.r-forge.r-project.org/
-:distr> Package "distrDoc" provides a vignette to this package as
-:distr> well as to several extension packages; try
-:distr> vignette("distr").
-
-
-Attaching package: 'distr'
-
-The following objects are masked from 'package:stats':
-
- df, qqplot, sd
-
-Loading required package: distrEx
-:distrEx> Extensions of Package 'distr' (version 2.6)
-:distrEx>
-:distrEx> Note: Packages "e1071", "moments", "fBasics" should be
-:distrEx> attached /before/ package "distrEx". See
-:distrEx> distrExMASK().Note: Extreme value distribution
-:distrEx> functionality has been moved to
-:distrEx>
-:distrEx> package "RobExtremes". See distrExMOVED().
-:distrEx>
-:distrEx> For more information see ?"distrEx", NEWS("distrEx"), as
-:distrEx> well as
-:distrEx> http://distr.r-forge.r-project.org/
-:distrEx> Package "distrDoc" provides a vignette to this package
-:distrEx> as well as to several related packages; try
-:distrEx> vignette("distr").
-
-
-Attaching package: 'distrEx'
-
-The following objects are masked from 'package:stats':
-
- IQR, mad, median, var
-
-:RandVar> Implementation of Random Variables (version 1.0)
-:RandVar>
-:RandVar> For more information see ?"RandVar", NEWS("RandVar"), as
-:RandVar> well as
-:RandVar> http://robast.r-forge.r-project.org/
-:RandVar> This package also includes a vignette; try
-:RandVar> vignette("RandVar").
-
-> set.seed(123)
->
-> ###############################################################################
-> ## start of tests
-> ###############################################################################
->
-> ## RandVariable
-> (R1 <- new("RandVariable"))
-An object of class "RandVariable"
-length of Map: 1
-Domain: NULL
-Range: NULL
-> (R1 <- RandVariable())
-An object of class "RandVariable"
-length of Map: 1
-Domain: NULL
-Range: NULL
-> Map(R1)
-[[1]]
-function (x)
-{
-}
-<environment: 0x09ee6428>
-
-> Domain(R1)
-NULL
-> Range(R1)
-NULL
-> Map(R1) <- list(function(x){ceiling(x)}, function(x){floor(x)})
-> Domain(R1) <- Reals()
-> Range(R1) <- Naturals()
-> R1
-An object of class "RandVariable"
-length of Map: 2
-Domain: Real Space with dimension 1
-Range: Grid of Naturals with dimension 1
-> Map(R1)
-[[1]]
-function (x)
-{
- ceiling(x)
-}
-
-[[2]]
-function (x)
-{
- floor(x)
-}
-
-> length(R1)
-[1] 2
->
-> R2 <- R1
-> Domain(R2) <- Naturals()
-> compatibleDomains(R1, R2)
-[1] TRUE
-> Domain(R2) <- NULL
-> compatibleDomains(R1, R2)
-[1] FALSE
-> Domain(R2) <- EuclideanSpace(dimension = 1)
-> compatibleDomains(R1, R2)
-[1] TRUE
-> Domain(R2) <- EuclideanSpace(dimension = 2)
-> compatibleDomains(R1, R2)
-[1] FALSE
->
->
-> ## list of functions
-> L1 <- list(function(x){x}, function(x){x^2}, function(x){x^3}, function(x){x^4})
-> L2 <- list(function(x){x}, function(x){x^2}, function(x){x^3}, function(x){x^4},
-+ function(x){x^5}, function(x){x^6})
-> L3 <- list(function(x){x}, function(x){x^2}, function(x){x^3}, function(x){x^4},
-+ function(x){x^5}, function(x){x^6}, function(x){x^7}, function(x){x^8})
-> L4 <- list(function(x){exp(x)}, function(x){abs(x)},
-+ function(x){sin(x)}, function(x){floor(x)})
->
-> ## EuclRandVariable
-> (R3 <- new("EuclRandVariable", Map = L4, Domain = Reals(), Range = Reals()))
-An object of class "EuclRandVariable"
-length of Map: 4
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> (R3 <- EuclRandVariable(L1, Domain = Reals(), dimension = 1))
-An object of class "EuclRandVariable"
-length of Map: 4
-Domain: Real Space with dimension 1
-Range: Euclidean Space with dimension 1
-> Map(R3)
-[[1]]
-function (x)
-{
- x
-}
-
-[[2]]
-function (x)
-{
- x^2
-}
-
-[[3]]
-function (x)
-{
- x^3
-}
-
-[[4]]
-function (x)
-{
- x^4
-}
-
-> Range(R3) <- Reals()
-> R3[2]
-An object of class "EuclRandVariable"
-length of Map: 1
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> Map(R3[3])
-[[1]]
-function (x)
-{
- x^3
-}
-
-> Map(R3[c(1,2,4)])
-[[1]]
-function (x)
-{
- x
-}
-
-[[2]]
-function (x)
-{
- x^2
-}
-
-[[3]]
-function (x)
-{
- x^4
-}
-
-> Map(R3[2:4])
-[[1]]
-function (x)
-{
- x^2
-}
-
-[[2]]
-function (x)
-{
- x^3
-}
-
-[[3]]
-function (x)
-{
- x^4
-}
-
-> evalRandVar(R3, rnorm(1))
- [,1]
-[1,] -0.56047565
-[2,] 0.31413295
-[3,] -0.17606387
-[4,] 0.09867951
-> x <- as.matrix(rnorm(10))
-> res.R3 <- evalRandVar(R3, x)
-> res.R3[2,,] # results for Map(R3)[[2]](x)
- [1] 0.052981677 2.429571609 0.004971433 0.016715318 2.941447909 0.212443749
- [7] 1.600379927 0.471766840 0.198614592 1.498376247
-> res.R3[2,1,] # results for Map(R3)[[2]](x[1,])
-[1] 0.05298168
-> # assuming a probability space with
-> # distribution Exp()
-> res.R31 <- evalRandVar(R3, x, Gammad())
-> res.R31[2,,] # results for Map(R3)[[2]](x)
- [1] NA 2.429571609 0.004971433 0.016715318 2.941447909 0.212443749
- [7] NA NA NA 1.498376247
-> res.R31[2,1,] # results for Map(R3)[[2]](x[1,])
-[1] NA
-> dimension(R3)
-[1] 4
->
-> R4 <- EuclRandVariable(L4, Domain = Reals(), dimension = 1)
-> DL1 <- imageDistr(R4, Norm())
-> plot(DL1)
->
-> Domain(R4) <- EuclideanSpace(dimension = 2)
-> Range(R4) <- EuclideanSpace(dimension = 2)
-> (X <- matrix(c(x, rnorm(10)), ncol = 2))
- [,1] [,2]
- [1,] -0.23017749 0.3598138
- [2,] 1.55870831 0.4007715
- [3,] 0.07050839 0.1106827
- [4,] 0.12928774 -0.5558411
- [5,] 1.71506499 1.7869131
- [6,] 0.46091621 0.4978505
- [7,] -1.26506123 -1.9666172
- [8,] -0.68685285 0.7013559
- [9,] -0.44566197 -0.4727914
-[10,] 1.22408180 -1.0678237
-> res2.R4 <- evalRandVar(R4, X)
-> res2.R4[3,,1] # results for Map(R4)[[3]](X[,1])
- [1] -0.22815034 0.99992694 0.07044998 0.12892786 0.98961131 0.44476889
- [7] -0.95362595 -0.63410681 -0.43105529 0.94049422
-> dimension(R4)
-[1] 8
->
->
-> ## EuclRandMatrix
-> (R5 <- as(R4, "EuclRandMatrix"))
-An object of class "EuclRandMatrix"
-Dim of Map: 4 1
-Domain: Euclidean Space with dimension 2
-Range: Euclidean Space with dimension 2
-> dimension(R5)
-[1] 8
-> Domain(R5) <- Reals()
-> Range(R5) <- Reals()
-> (DL2 <- imageDistr(R5, Norm())) # list of distributions
-An object of class "DistrList"
- [[1]] Distribution Object of Class: AbscontDistribution
- [[2]] Distribution Object of Class: AbscontDistribution
- [[3]] Distribution Object of Class: AbscontDistribution
- [[4]] Distribution Object of Class: AbscontDistribution
-Warning messages:
-1: In function (object) :
- arithmetics on distributions are understood as operations on r.v.'s
-see 'distrARITH()'; for switching off this warning see '?distroptions'
-2: In function (object) :
- slots d,p,q have been filled using simulations; for switching off this warning see '?distroptions'
-> plot(DL2) # vgl. DL1
->
-> Domain(R5) <- EuclideanSpace(dimension = 2)
-> Range(R5) <- EuclideanSpace(dimension = 2)
-> #res1.R5 <- evalRandVar(R5, rnorm(2))
-> #res1.R5[1,1,] # result for map of R5[1,1]
->
-> res2.R5 <- evalRandVar(R5, X)
-> res2.R5[,,1,2]
-[1] 1.4330626 0.3598138 0.3521000 0.0000000
-> res2.R5[,1,2,1:2]
- [,1] [,2]
-[1,] 4.7526783 1.4929760
-[2,] 1.5587083 0.4007715
-[3,] 0.9999269 0.3901288
-[4,] 1.0000000 0.0000000
-> res2.R5[1,1,1:2,2]
-[1] 1.433063 1.492976
->
-> new("EuclRandMatrix", Map = L2, Dim = as.integer(c(3,2)), Domain = Reals(), Range = Reals())
-An object of class "EuclRandMatrix"
-Dim of Map: 3 2
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> (R6 <- EuclRandMatrix(Map = L2, ncol = 2, Domain = Reals(), Range = Reals()))
-An object of class "EuclRandMatrix"
-Dim of Map: 3 2
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> R6[1:2, 2]
-An object of class "EuclRandVariable"
-length of Map: 2
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> R6[1:2, 1:2]
-An object of class "EuclRandMatrix"
-Dim of Map: 2 2
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> Map(R6[1,2])
-[[1]]
-function (x)
-{
- x^4
-}
-
-> Map(t(R6)[2,1])
-[[1]]
-function (x)
-{
- f <- function (x)
- {
- x^4
- }
- t(f(x))
-}
-<environment: 0x099a036c>
-
-> dimension(R6)
-[1] 6
->
-> R7 <- EuclRandMatrix(Map = L4, ncol = 2, Domain = Reals(), dimension = 1)
-> dimension(R7)
-[1] 4
-> (DL3 <- imageDistr(R7, Norm()))
-An object of class "DistrList"
- [[1]] Distribution Object of Class: AbscontDistribution
- [[2]] Distribution Object of Class: AbscontDistribution
- [[3]] Distribution Object of Class: AbscontDistribution
- [[4]] Distribution Object of Class: AbscontDistribution
-Warning messages:
-1: In function (object) :
- arithmetics on distributions are understood as operations on r.v.'s
-see 'distrARITH()'; for switching off this warning see '?distroptions'
-2: In function (object) :
- slots d,p,q have been filled using simulations; for switching off this warning see '?distroptions'
-> plot(DL3) # vgl. DL1, DL2
->
->
-> ## EuclRandVarList
-> new("EuclRandVarList")
-An object of class "EuclRandVarList"
-Domain: NULL
-[[1]]
-length of Map: 1
-Range: Euclidean Space with dimension 1
-> (RL1 <- EuclRandVarList(R3, R6, R7))
-An object of class "EuclRandVarList"
-Domain: Real Space with dimension 1
-[[1]]
-length of Map: 4
-Range: Real Space with dimension 1
-[[2]]
-Dim of Map: 3 2
-Range: Real Space with dimension 1
-[[3]]
-Dim of Map: 2 2
-Range: Euclidean Space with dimension 1
-> dimension(RL1)
-[1] 14
-> as(R4, "EuclRandVarList")
-An object of class "EuclRandVarList"
-Domain: Euclidean Space with dimension 2
-[[1]]
-length of Map: 4
-Range: Euclidean Space with dimension 2
-> as(R6, "EuclRandVarList")
-An object of class "EuclRandVarList"
-Domain: Real Space with dimension 1
-[[1]]
-Dim of Map: 3 2
-Range: Real Space with dimension 1
-> Domain(R5) <- Reals()
-> Range(R5) <- Reals()
-> (RL2 <- EuclRandVarList(R5, R7))
-An object of class "EuclRandVarList"
-Domain: Real Space with dimension 1
-[[1]]
-Dim of Map: 4 1
-Range: Real Space with dimension 1
-[[2]]
-Dim of Map: 2 2
-Range: Euclidean Space with dimension 1
-> (DL4 <- imageDistr(RL2, Norm()))
-An object of class "DistrList"
- [[1]] Distribution Object of Class: AbscontDistribution
- [[2]] Distribution Object of Class: AbscontDistribution
- [[3]] Distribution Object of Class: AbscontDistribution
- [[4]] Distribution Object of Class: AbscontDistribution
- [[5]] Distribution Object of Class: AbscontDistribution
- [[6]] Distribution Object of Class: AbscontDistribution
- [[7]] Distribution Object of Class: AbscontDistribution
- [[8]] Distribution Object of Class: AbscontDistribution
-Warning messages:
-1: In function (object) :
- arithmetics on distributions are understood as operations on r.v.'s
-see 'distrARITH()'; for switching off this warning see '?distroptions'
-2: In function (object) :
- slots d,p,q have been filled using simulations; for switching off this warning see '?distroptions'
-> plot(DL4)
->
->
-> ## "Math" group
-> system.time(Map(log(abs(R4))), gcFirst = TRUE)
- user system elapsed
- 0 0 0
-> system.time(Map(gamma(R7)), gcFirst = TRUE)
- user system elapsed
- 0 0 0
-> system.time(Map(exp(RL1)[[1]]), gcFirst = TRUE)
- user system elapsed
- 0 0 0
->
->
-> ## "Arith" group
-> system.time(Map(3 + R3), gcFirst = TRUE)
- user system elapsed
- 0 0 0
-> Map(c(1,3,5) * R3)
-[[1]]
-function (x)
-{
- f2 <- function (x)
- {
- x
- }
- 1 * f2(x)
-}
-<environment: 0x09f52240>
-
-[[2]]
-function (x)
-{
- f2 <- function (x)
- {
- x^2
- }
- 3 * f2(x)
-}
-<environment: 0x09f52240>
-
-[[3]]
-function (x)
-{
- f2 <- function (x)
- {
- x^3
- }
- 5 * f2(x)
-}
-<environment: 0x09f52240>
-
-[[4]]
-function (x)
-{
- f2 <- function (x)
- {
- x^4
- }
- 1 * f2(x)
-}
-<environment: 0x09f52240>
-
-Warning message:
-In c(1, 3, 5) * R3 :
- longer object length is not a multiple of shorter object length
-> try(1:5 * R3) # error
-Error in 1:5 * R3 :
- length of 'numeric' has to be less or equal dimension of 'EuclRandVariable'
-> Map(1:2 * R4)
-[[1]]
-function (x)
-{
- f2 <- function (x)
- {
- exp(x)
- }
- 1:2 * f2(x)
-}
-<environment: 0x09f1a8c0>
-
-[[2]]
-function (x)
-{
- f2 <- function (x)
- {
- abs(x)
- }
- 1:2 * f2(x)
-}
-<environment: 0x09f1a8c0>
-
-[[3]]
-function (x)
-{
- f2 <- function (x)
- {
- sin(x)
- }
- 1:2 * f2(x)
-}
-<environment: 0x09f1a8c0>
-
-[[4]]
-function (x)
-{
- f2 <- function (x)
- {
- floor(x)
- }
- 1:2 * f2(x)
-}
-<environment: 0x09f1a8c0>
-
-> Map(2/R6)
-[[1]]
-function (x)
-{
- f2 <- function (x)
- {
- x
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-[[2]]
-function (x)
-{
- f2 <- function (x)
- {
- x^2
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-[[3]]
-function (x)
-{
- f2 <- function (x)
- {
- x^3
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-[[4]]
-function (x)
-{
- f2 <- function (x)
- {
- x^4
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-[[5]]
-function (x)
-{
- f2 <- function (x)
- {
- x^5
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-[[6]]
-function (x)
-{
- f2 <- function (x)
- {
- x^6
- }
- 2/f2(x)
-}
-<environment: 0x09ee624c>
-
-> Map(c(1,3,5) %% R6)
-[[1]]
-function (x)
-{
- f2 <- function (x)
- {
- x
- }
- 1%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-[[2]]
-function (x)
-{
- f2 <- function (x)
- {
- x^2
- }
- 3%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-[[3]]
-function (x)
-{
- f2 <- function (x)
- {
- x^3
- }
- 5%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-[[4]]
-function (x)
-{
- f2 <- function (x)
- {
- x^4
- }
- 1%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-[[5]]
-function (x)
-{
- f2 <- function (x)
- {
- x^5
- }
- 3%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-[[6]]
-function (x)
-{
- f2 <- function (x)
- {
- x^6
- }
- 5%%f2(x)
-}
-<environment: 0x09eaf0cc>
-
-> Map(R4 - 5)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- exp(x)
- }
- f1(x) - c(5, 5)
-}
-<environment: 0x09e97288>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- abs(x)
- }
- f1(x) - c(5, 5)
-}
-<environment: 0x09e97288>
-
-[[3]]
-function (x)
-{
- f1 <- function (x)
- {
- sin(x)
- }
- f1(x) - c(5, 5)
-}
-<environment: 0x09e97288>
-
-[[4]]
-function (x)
-{
- f1 <- function (x)
- {
- floor(x)
- }
- f1(x) - c(5, 5)
-}
-<environment: 0x09e97288>
-
-> Map(R6 %/% 2)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- x
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- x^2
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-[[3]]
-function (x)
-{
- f1 <- function (x)
- {
- x^3
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-[[4]]
-function (x)
-{
- f1 <- function (x)
- {
- x^4
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-[[5]]
-function (x)
-{
- f1 <- function (x)
- {
- x^5
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-[[6]]
-function (x)
-{
- f1 <- function (x)
- {
- x^6
- }
- f1(x)%/%2
-}
-<environment: 0x09e698c8>
-
-> Map(R3 ^ R3)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- x
- }
- f2 <- function (x)
- {
- x
- }
- f1(x)^f2(x)
-}
-<environment: 0x09e52954>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- x^2
- }
- f2 <- function (x)
- {
- x^2
- }
- f1(x)^f2(x)
-}
-<environment: 0x09e52954>
-
-[[3]]
-function (x)
-{
- f1 <- function (x)
- {
- x^3
- }
- f2 <- function (x)
- {
- x^3
- }
- f1(x)^f2(x)
-}
-<environment: 0x09e52954>
-
-[[4]]
-function (x)
-{
- f1 <- function (x)
- {
- x^4
- }
- f2 <- function (x)
- {
- x^4
- }
- f1(x)^f2(x)
-}
-<environment: 0x09e52954>
-
-> Map(R7 * R7)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- exp(x)
- }
- f2 <- function (x)
- {
- exp(x)
- }
- f1(x) * f2(x)
-}
-<environment: 0x09df6a7c>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- abs(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) * f2(x)
-}
-<environment: 0x09df6a7c>
-
-[[3]]
-function (x)
-{
- f1 <- function (x)
- {
- sin(x)
- }
- f2 <- function (x)
- {
- sin(x)
- }
- f1(x) * f2(x)
-}
-<environment: 0x09df6a7c>
-
-[[4]]
-function (x)
-{
- f1 <- function (x)
- {
- floor(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) * f2(x)
-}
-<environment: 0x09df6a7c>
-
-> Map((1 + RL1)[[1]])
-[[1]]
-function (x)
-{
- f2 <- function (x)
- {
- x
- }
- 1 + f2(x)
-}
-<environment: 0x09db010c>
-
-[[2]]
-function (x)
-{
- f2 <- function (x)
- {
- x^2
- }
- 1 + f2(x)
-}
-<environment: 0x09db010c>
-
-[[3]]
-function (x)
-{
- f2 <- function (x)
- {
- x^3
- }
- 1 + f2(x)
-}
-<environment: 0x09db010c>
-
-[[4]]
-function (x)
-{
- f2 <- function (x)
- {
- x^4
- }
- 1 + f2(x)
-}
-<environment: 0x09db010c>
-
-> Map((RL1 * 2)[[2]])
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- x
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- x^2
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-[[3]]
-function (x)
-{
- f1 <- function (x)
- {
- x^3
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-[[4]]
-function (x)
-{
- f1 <- function (x)
- {
- x^4
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-[[5]]
-function (x)
-{
- f1 <- function (x)
- {
- x^5
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-[[6]]
-function (x)
-{
- f1 <- function (x)
- {
- x^6
- }
- f1(x) * 2
-}
-<environment: 0x09d1a208>
-
-> system.time(Map((RL1 %% RL1)[[3]]), gcFirst = TRUE)
- user system elapsed
- 0.02 0.00 0.02
->
->
-> ## "%*%"
-> M1 <- matrix(1:16, ncol = 8)
-> (R8 <- M1 %*% R4)
-An object of class "EuclRandMatrix"
-Dim of Map: 2 1
-Domain: Euclidean Space with dimension 2
-Range: Real Space with dimension 1
-> Map(R4)
-[[1]]
-function (x)
-{
- exp(x)
-}
-
-[[2]]
-function (x)
-{
- abs(x)
-}
-
-[[3]]
-function (x)
-{
- sin(x)
-}
-
-[[4]]
-function (x)
-{
- floor(x)
-}
-
-> M1[1,]
-[1] 1 3 5 7 9 11 13 15
-> Map(R8)[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- c(1L, 3L) %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + c(5L, 7L) %*% f2(x)
- }
- f2 <- function (x)
- {
- sin(x)
- }
- f1(x) + c(9L, 11L) %*% f2(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + c(13L, 15L) %*% f2(x)
-}
-<environment: 0x09ed34ac>
-> M1[2,]
-[1] 2 4 6 8 10 12 14 16
-> Map(R8)[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- c(2L, 4L) %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + c(6L, 8L) %*% f2(x)
- }
- f2 <- function (x)
- {
- sin(x)
- }
- f1(x) + c(10L, 12L) %*% f2(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + c(14L, 16L) %*% f2(x)
-}
-<environment: 0x09ed34ac>
-> M2 <- matrix(1:2, ncol = 2)
-> (R9 <- M2 %*% R7)
-An object of class "EuclRandMatrix"
-Dim of Map: 1 2
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> Map(R7)
-[[1]]
-function (x)
-{
- exp(x)
-}
-
-[[2]]
-function (x)
-{
- abs(x)
-}
-
-[[3]]
-function (x)
-{
- sin(x)
-}
-
-[[4]]
-function (x)
-{
- floor(x)
-}
-
-> Map(R9)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + 2L %*% f2(x)
-}
-<environment: 0x09e68388>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- sin(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + 2L %*% f2(x)
-}
-<environment: 0x09e3da40>
-
-> Map(1:4 %*% R3) # inner product
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- x
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- x^2
- }
- f1(x) + 2L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^3
- }
- f1(x) + 3L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^4
- }
- f1(x) + 4L %*% f2(x)
-}
-<environment: 0x09de4a0c>
-
-> Map(1:2 %*% R7) # corresponds to Map(t(1:2) %*% R7)
-[[1]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + 2L %*% f2(x)
-}
-<environment: 0x09d6b21c>
-
-[[2]]
-function (x)
-{
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- sin(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + 2L %*% f2(x)
-}
-<environment: 0x09d453b0>
-
-> Map(R4 %*% 1:8) # inner product
-[[1]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f <- function (x)
- {
- f <- function (x)
- {
- exp(x)
- }
- t(f(x))
- }
- t(f(x))
- }
- 1:2 %*% f1(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f <- function (x)
- {
- abs(x)
- }
- t(f(x))
- }
- t(f(x))
- }
- f1(x) + 3:4 %*% f2(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f <- function (x)
- {
- sin(x)
- }
- t(f(x))
- }
- t(f(x))
- }
- f1(x) + 5:6 %*% f2(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f <- function (x)
- {
- floor(x)
- }
- t(f(x))
- }
- t(f(x))
- }
- f1(x) + 7:8 %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09ccdf2c>
-
-> Map(R9 %*% 3:4)
-[[1]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- 3L %*% f1(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- sin(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- f1(x) + 4L %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09c7b6ac>
-
-> Map(R9 %*% matrix(1:4, nrow = 2))
-[[1]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- sin(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09bf32bc>
-
-[[2]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- exp(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- abs(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- 3L %*% f1(x)
- }
- f2 <- function (x)
- {
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- sin(x)
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- floor(x)
- }
- f1(x) + 2L %*% f2(x)
- }
- t(f(x))
- }
- f1(x) + 4L %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09bf32bc>
-
-> (R10 <- R3 %*% matrix(1:16, ncol = 4))
-An object of class "EuclRandMatrix"
-Dim of Map: 1 4
-Domain: Real Space with dimension 1
-Range: Real Space with dimension 1
-> Map(R10)
-[[1]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- x
- }
- 1L %*% f1(x)
- }
- f2 <- function (x)
- {
- x^2
- }
- f1(x) + 5L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^3
- }
- f1(x) + 9L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^4
- }
- f1(x) + 13L %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09b8541c>
-
-[[2]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
- {
- x
- }
- 2L %*% f1(x)
- }
- f2 <- function (x)
- {
- x^2
- }
- f1(x) + 6L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^3
- }
- f1(x) + 10L %*% f2(x)
- }
- f2 <- function (x)
- {
- x^4
- }
- f1(x) + 14L %*% f2(x)
- }
- t(f(x))
-}
-<environment: 0x09b8541c>
-
-[[3]]
-function (x)
-{
- f <- function (x)
- {
- f1 <- function (x)
- {
- f1 <- function (x)
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/robast -r 933
More information about the Robast-commits
mailing list