View source: R/RTseriesExtDataPath.R
RTseriesExtDataPath | R Documentation |
Provides a complete path to external RTseries data sets.
RTseriesExtDataPath(file = "")
file |
The name of the RTseries data set file. |
A character string giving the complete path to the sepecified data set file. If the data set file does not exist, a warning is given and zero-length character string is returned.
CarrotPrices <- scan(RTseriesExtDataPath('CarrotPrices.txt')) # After eading the data, create time series and time series data objects CarrotPrices.ts <- ts(CarrotPrices,frequency=12,start=c(1999,1)) CarrotPrices.tsd <- tsd(CarrotPrices.ts, data.title='Carrot Prices from 1999 to 2007', response.units='Dollars/cwt', time.units='Year') BestBuySalesRegdat <- read.csv(RTseriesExtDataPath('BestBuySalesRegdat.csv')) # Extract the response vector from the data frame BestBuySales <- BestBuySalesRegdat$MillionsOfDollars ozoneRegdat <- read.csv(RTseriesExtDataPath('ozoneRegdat.csv'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.