conform: Conform

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/conform.R

Description

Conform an object to internal standards

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
conform(x, ...)

## S3 method for class 'character'
conform(x, fun = getOption("conform", conformist),
  ...)

## S3 method for class 'data.frame'
conform(x, ...)

## S3 method for class 'data.table'
conform(x, ...)

Arguments

x

object. Object to conform usually a data.frame, data.table or character vector

...

objects passed to the next method(s).

fun

function to perform the conformation. The default is to look for the global conformation function: getOptions('conform')

Details

conform provides a very abstract way to ensure that all names follow a predefined convention.

The default conformation ...
trims whitespace, abbreviates words, enforces snake_case. and makes_names

Value

same type of object as x with its property set by conform

Note

DP naming standards are lowercase, underscores('_') for whitespace (not periods('.'), leading dot is retained

This function is idempotent – multiple application of the function do not change the results.#' @return data frame that has been conformed to DP standards

Author(s)

Christopher Brown

Examples

1
2

decisionpatterns/conformist documentation built on Nov. 4, 2019, 10:23 a.m.