1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dbcal.R
\name{as.caldays}
\alias{as.caldays}
\title{Convert Stata business calendar dates in readable dates.}
\usage{
as.caldays(buisdays, cal, format = "\%Y-\%m-\%d")
}
\arguments{
\item{buisdays}{numeric Vector of business dates}
\item{cal}{data.frame Conversion table for business calendar dates}
\item{format}{character String with date format as in \code{\link{as.Date}}}
}
\value{
Returns a vector of readable dates.
}
\description{
Convert Stata business calendar dates in readable dates.
}
\examples{
# read business calendar and data
sp500 <- stbcal(system.file("extdata/sp500.stbcal", package="readstata13"))
dat <- read.dta13(system.file("extdata/statacar.dta", package="readstata13"))
# convert dates and check
dat$ldatescal2 <- as.caldays(dat$ldate, sp500)
all(dat$ldatescal2==dat$ldatescal)
}
\author{
Jan Marvin Garbuszus \email{jan.garbuszus@ruhr-uni-bochum.de}
Sebastian Jeworutzki \email{sebastian.jeworutzki@ruhr-uni-bochum.de}
}
|