fringe: Create a Fringe data frame

View source: R/fringe.R

fringeR Documentation

Create a Fringe data frame

Description

Create a Fringe object from a data frame. The main value of a fringe is its metadata. When creating it, fringe will add to the data frame the following information:

  • data: original data frame data. When it is created, the fringe will convert original variable R types onto homodatum ones (Num, Cat, Pct, etc. -see available_hdTypes())

  • dic: A diccionary is created with three variable characteristics: id, label and hdType

  • frType: Shows all variable types based in homodatum schema

  • group: A grouped view of frType

  • name: Name for the fringe data frame, setted on name argument

  • description: Description for the fringe data frame, setted on description argument

  • slug: a custom slug can be added

  • stats: Depending on the variable type given by homodatum, the fringe will generate different kind of statistics: nrow, ncol, n_unique, n_na, pct_na, min, max

Usage

fringe(
  x = new_data_frame(),
  frtype = NULL,
  dic = NULL,
  name = NULL,
  description = NULL,
  slug = NULL,
  meta = NULL,
  ...
)

Arguments

x

A data frame

frtype

The type of fringe to create

dic

a custom variable dictionary can be added. create_dic() can help you with that.

name

a custom name can be added

slug

a custom slug can be added. If not, fringe will try creating one.

meta

Custom Metadata can be added

nam

a custom description can be added

Value

A Fringe object

Examples

fringe(mtcars, frtype = "Num", name = "MTCars")


datasketch/homodatum documentation built on May 1, 2023, 12:17 a.m.