Skip to content

Commit

Permalink
sample_matrix data file for examples, tests, and vignette(s)
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/xts/pkg@72 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
  • Loading branch information
jaryan committed Feb 15, 2008
1 parent 9df3cba commit 1bc4c4b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
Binary file removed data/sample.data.rda
Binary file not shown.
Binary file added data/sample_matrix.rda
Binary file not shown.
6 changes: 6 additions & 0 deletions inst/doc/xts.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ str(df_xts)
@

\noindent
A few comments about the above. {\sf as.xts} takes different arguments, depending
on the original object to be converted from. Some classes do not contain enough
information to infer a time-date class. If that is the case, POSIXct is used by
default. This is the case with both matrix and data.frame object. In the preceding
examples we first requested that the new date format be of type 'Date'. The
second example was left to the default {\sf xts} method.

\subsection{{\sf xts} methods}

Expand Down
21 changes: 21 additions & 0 deletions man/sample.data.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\name{sample_matrix}
\alias{sample_matrix}
\docType{data}
\title{ Sample Data Matrix For xts Example and Unit Testing }
\description{
Simulated 180 observations on 4 variables.
}
\usage{data(sample_matrix)}
\format{
\preformatted{
The format is:
num [1:180, 1:4] 50.0 50.2 50.4 50.4 50.2 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:180] "2007-01-02" "2007-01-03" "2007-01-04" "2007-01-05" ...
..$ : chr [1:4] "Open" "High" "Low" "Close"
}
}
\examples{
data(.sample.matrix)
}
\keyword{datasets}

0 comments on commit 1bc4c4b

Please sign in to comment.