Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
enabling passing directely the configuration list to create.cctable()
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanshi committed Nov 7, 2016
1 parent 6c8486e commit 1320b0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
9 changes: 6 additions & 3 deletions R/ccTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ show = function() {

#' construct function of ccTable object
#' @param rec ccRecord
#' @param conf the path of YAML configuration file.
#' @param conf either the path of YAML configuration file or the configuration
#' structure in list.
#' @param freq the data cadence in hour.
#' @return ccTable object
#' @export create.cctable
create.cctable <- function(rec, freq, conf=NULL) {
if (is.null(conf))
conf <- ccdata:::ITEM_REF
else
conf <- yaml.load_file(conf)
else {
if (is.character(conf))
conf <- yaml.load_file(conf)
}

cct <- ccTable(record=rec, conf=conf)
cct$create.table(freq)
Expand Down
2 changes: 1 addition & 1 deletion R/create2dclean.r
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.create2dclean <- function(record, config, freq) {
dt.sofa <- create.cctable(conf=config, record=record, freq=freq)
dt.sofa <- create.cctable(rec=record, conf=config, freq=freq)
dt.sofa$filter.ranges()
dt.sofa$filter.category()
dt.sofa$filter.missingness()
Expand Down
3 changes: 2 additions & 1 deletion man/create.cctable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions man/selectIndex.Rd

This file was deleted.

0 comments on commit 1320b0b

Please sign in to comment.