Type: | Package |
Title: | Pre-Process of Time Series Data Set in R |
Version: | 1.1.0 |
Date: | 2016-10-03 |
Author: | Will Kuan <aiien61will@gmail.com> |
Maintainer: | Will Kuan <aiien61will@gmail.com> |
Description: | Pre-process for discrete time series data set which is not continuous at the column of 'date'. Refilling records of missing 'date' and other columns to the hollow data set so that final data set is able to be dealt with time series analysis. |
License: | GPL (≥ 3) |
URL: | https://github.com/Willdata/tigerhitteR |
LazyData: | TRUE |
RoxygenNote: | 5.0.1 |
Imports: | openxlsx (≥ 3.0.0), zoo (≥ 1.7-13), Hmisc (≥ 3.17-4), magrittr(≥ 1.5) |
Depends: | R (≥ 3.3.1) |
NeedsCompilation: | no |
Packaged: | 2016-10-02 16:47:38 UTC; mac |
Repository: | CRAN |
Date/Publication: | 2016-10-03 09:43:03 |
Transaction Data of The Product
Description
This data set is an example transaction data set which contains transactional details of a product in a couple of years
Usage
data.example
Format
A data.frame containing 975 observations.
Complete the hollow dataset
Description
Take time series dataset and fields, then refill the missing date records and other fields.
Usage
dateRefill.fromData(data, dateCol.index, fixedCol.index,
uninterpolatedCol.index, uninterpolatedCol.newValue)
Arguments
data |
The data.frame dataset which is ready to be processed |
dateCol.index |
Date column |
fixedCol.index |
A row of column number which should be kept same values with the original |
uninterpolatedCol.index |
The column number which should be changed to different value into new record. |
uninterpolatedCol.newValue |
The value of a specific column which should be put into the new record. |
Details
Real time series sales dataset could be not continuous in 'date' field. e.g., monthly sales data is continuous, but discrete in daily data.
This hollow dataset is not complete for time series analysis. Function dateRefill.fromFile is a transformation which tranforms uncomplete dataset into complete dataset.
Value
The dataset which is completed.
Author(s)
Will Kuan
Examples
# mydata <- data.example
# mydata.final <- dateRefill.fromData(data = mydata,dateCol = 2,fixedVec = c(3:10),
# uninterpolatedCol.index = 11,uninterpolatedCol.newValue = 0)
Complete the hollow dataset
Description
Take time series dataset and fields, then refill the missing date records and other fields.
Usage
dateRefill.fromFileToExcel(inPath, sheet, dateCol.index, outPath,
fixedCol.index, uninterpolatedCol.index, uninterpolatedCol.newValue)
Arguments
inPath |
A path which is the location of uncompleted dataset which must be xlsx file |
sheet |
A worksheet name of the dataset |
dateCol.index |
Date column |
outPath |
A path where the location of xlsx file of completed dataset should be |
fixedCol.index |
A row of column number which should be kept same values with the original |
uninterpolatedCol.index |
The column number which should be changed to different value into new record. |
uninterpolatedCol.newValue |
The value of a specific column which should be put into the new record. |
Details
Real time series sales dataset could be not continuous in 'date' field. e.g., monthly sales data is continuous, but discrete in daily data.
This hollow dataset is not complete for time series analysis. Function dateRefill.fromFile is a transformation which tranforms uncomplete dataset into complete dataset.
Author(s)
Will Kuan
Examples
# Please refer to the examples of function dateRefill.fromData