[Yuima-commits] r125 - in pkg/yuima: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 18 13:53:17 CEST 2010
Author: hinohide
Date: 2010-08-18 13:53:17 +0200 (Wed, 18 Aug 2010)
New Revision: 125
Modified:
pkg/yuima/DESCRIPTION
pkg/yuima/NAMESPACE
pkg/yuima/NEWS
pkg/yuima/R/yuima.data.R
pkg/yuima/man/setData.Rd
pkg/yuima/man/yuima-class.Rd
pkg/yuima/man/yuima.data-class.Rd
Log:
added a function yuima.cbind
Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/DESCRIPTION 2010-08-18 11:53:17 UTC (rev 125)
@@ -1,8 +1,8 @@
Package: yuima
Type: Package
Title: The YUIMA Project package (unstable version)
-Version: 0.1.14
-Date: 2010-08-12
+Version: 0.1.15
+Date: 2010-08-18
Depends: methods, zoo, stats4, utils
Suggests: cubature, mvtnorm
Author: YUIMA Project Team.
Modified: pkg/yuima/NAMESPACE
===================================================================
--- pkg/yuima/NAMESPACE 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/NAMESPACE 2010-08-18 11:53:17 UTC (rev 125)
@@ -43,7 +43,8 @@
"simFunctional",
"F0",
"Fnorm",
- "asymptotic_term"
+ "asymptotic_term",
+ "cbind.yuima"
)
## function which we want to expose to the user
@@ -95,6 +96,7 @@
export(qmleR)
export(qmleL)
+export(cbind.yuima)
S3method(toLatex, yuima)
S3method(toLatex, yuima.model)
Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/NEWS 2010-08-18 11:53:17 UTC (rev 125)
@@ -1,4 +1,8 @@
Changes in Version 0.1.14
+ o added yuima.cbind function to bind yuima.data object by column.
+
+
+Changes in Version 0.1.14
o added a correlation matrix to the output of "cce". Accordingly,
the output of the function cce is now a list which contains a covariance
matrix and a correlation matrix.
Modified: pkg/yuima/R/yuima.data.R
===================================================================
--- pkg/yuima/R/yuima.data.R 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/R/yuima.data.R 2010-08-18 11:53:17 UTC (rev 125)
@@ -132,3 +132,58 @@
plot(x at data,xlab=xlab,ylab=ylab,...)
}
})
+
+
+##:: yuima.data obj cbind ( implementation 08/18 )
+setGeneric("cbind.yuima",
+ function(x, ...)
+ standardGeneric("cbind.yuima")
+ )
+
+setMethod("cbind.yuima", signature(x="yuima"),
+ function(x, ...){
+ ##:: init
+ y.list <- list(x, ...)
+ y.num <- length(y.list)
+
+ ##:: bind yuima.data in yuima
+ yd.tmp <- y.list[[1]]@data
+ for(idx in 2:y.num){
+ ##:: error check
+ if( class(y.list[[idx]])!="yuima"){
+ stop("arg ", idx, " is not yuima-class")
+ }
+ ##:: bind
+ yd.tmp <- cbind.yuima(yd.tmp, y.list[[idx]]@data)
+ }
+
+ ##:: substitute yuima.data
+ x at data <- yd.tmp
+
+ ##:: return result
+ return(x)
+ }
+ )
+
+setMethod("cbind.yuima", signature(x="yuima.data"),
+ function(x, ...){
+ ##:: init
+ yd.list <- list(x, ...)
+ yd.num <- length(yd.list)
+
+ ##:: bind yuima.data (original.data)
+ od.tmp <- yd.list[[1]]@original.data
+ for(idx in 2:yd.num){
+ ##:: error check
+ if( class(yd.list[[idx]])!="yuima.data" ){
+ stop("arg ", idx, " is not yuima.data-class.")
+ }
+ ##:: bind
+ od.tmp <- cbind(od.tmp, yd.list[[idx]]@original.data)
+ }
+ ##:: return result
+ return(new("yuima.data", original.data=od.tmp))
+ }
+ )
+
+##:: END ( yuima.data obj cbind )
Modified: pkg/yuima/man/setData.Rd
===================================================================
--- pkg/yuima/man/setData.Rd 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/man/setData.Rd 2010-08-18 11:53:17 UTC (rev 125)
@@ -3,6 +3,7 @@
\alias{get.zoo.data}
\alias{dim}
\alias{length}
+\alias{cbind.yuima}
\title{
Set and access data of an object of type "yuima.data" or "yuima".
@@ -22,6 +23,7 @@
\code{length} returns the \code{\link{length}} of the time series in
\code{zoo.data} slot of a \code{\link{yuima.data-class}} object.
+\code{cbind.yuima} bind yuima.data object.
}
\usage{
setData(original.data)
Modified: pkg/yuima/man/yuima-class.Rd
===================================================================
--- pkg/yuima/man/yuima-class.Rd 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/man/yuima-class.Rd 2010-08-18 11:53:17 UTC (rev 125)
@@ -15,6 +15,7 @@
\alias{ml.ql,yuima-method}
\alias{limiting.gamma,yuima-method}
\alias{LSE,yuima-method}
+\alias{cbind.yuima,yuima-method}
\title{Class for stochastic differential equations}
\description{
@@ -78,6 +79,7 @@
For more details see \code{\link{cce}}.}
\item{simulate}{simulation method. For more information see
\code{\link{simulate}}.}
+ \item{cbind.yuima}{\code{signature(x = "yuima")}: bind yuima.data object.}
}
}
\author{The YUIMA Project Team}
Modified: pkg/yuima/man/yuima.data-class.Rd
===================================================================
--- pkg/yuima/man/yuima.data-class.Rd 2010-08-12 07:25:00 UTC (rev 124)
+++ pkg/yuima/man/yuima.data-class.Rd 2010-08-18 11:53:17 UTC (rev 125)
@@ -14,6 +14,7 @@
%\alias{setSampling,yuima.data-method}
\alias{poisson.random.sampling,yuima.data-method}
\alias{subsampling,yuima.data-method}
+\alias{cbind.yuima,yuima.data-method}
\title{Class "yuima.data" for the data slot of a "yuima" class object}
\description{
@@ -85,6 +86,7 @@
\item{cce}{\code{signature(x = "yuima.data")}: calculates asyncronous
covariance estimator on the data contained in \code{x at zoo.data}.
For more details see \code{\link{cce}}.}
+ \item{cbind.yuima}{\code{signature(x = "yuima.data")}: bind yuima.data object.}
}
}
\author{The YUIMA Project Team}
More information about the Yuima-commits
mailing list