Learn R Programming

dcmodifydb (version 0.3.1)

person: Person data, income and smoking habits

Description

A synthetic data set with person data with records to be corrected. The datasethas missing values

Usage

person

Arguments

Format

A data frame with x rows and variables:

income

monthly income, in US dollars

age

age of a person in year

gender

gender of a person

year

year of measurement

smokes

if a person smokes or not

cigarettes

how many cigarretes a person smokes

...

The dataset is also available as a sqlite database at system.file("db/person.db", package="dcmodifydb")

Examples

Run this code
# NOT RUN {
# load modification rules and apply:
library(dcmodify)
rules <- modifier(.file = system.file("db/corrections.yml", package="dcmodifydb"))

con <- DBI::dbConnect(RSQLite::SQLite(), dbname=system.file("db/person.db", package="dcmodifydb"))
person <- dplyr::tbl(con, "person")
print(person)

person2 <- modify(person, rules, copy=TRUE)
print(person2)
# }

Run the code above in your browser using DataLab