Skip to content

CC-HIC/ccfun

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Critical care HIC project functions

Build Status

Installation

You will need devtools, and then simply

install_github("cc-hic/ccfun")
library(ccfun)

Help is available for most functions

R> ?ccfun::relabel_cols
relabel_cols               package:ccfun               R Documentation

Relabels a wide data2d data.table

Description:

     Relabels the columns of a wide data2d data.table (as generated by
     the selectTable function in ccdata). Because this uses the
     data.table::setnames function then the name changes happen 'in
     place' and nothing is returned

Usage:

     relabel_cols(dt, label.in, label.out, dict = NULL)

Arguments:

      dt: data.table to be relabelled

label.in: name for the item to be translated

label.out: name of the item to be used for the new column name

    dict: defaults to ITEM_REF

Value:

     0 (if the function completes)

Examples:

     # use the ITEM_REF dictionary (not run)
     # relabel_cols(tdt, "dataItem", "shortName")
     # use a custom dictionary (not run)
     # relabel_cols(tdt, "dataItem", "shortName", dict=analysis.dict)

About

Clinical helper functions for working with CCHIC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%