Learn R Programming

edpclient (version 0.5.1)

identifying: Identifying Columns

Description

Get or set identifying columns on a data frame

Usage

identifying(col)
identifying(col) <- value
identifying_columns(data)
identifying_columns(data) <- value

Arguments

col

a column in a data frame

data

a data frame

value

a single logical in the case of identifying, or a character vector in the case of identifying_columns

Value

identifying returns a single logical. identifying_columns returns a character vector.

Details

In EDP, "identifying columns" are columns that uniquely identify a row. When preparing a data frame to build a population from, you can mark columns as identifying. select and simulate return this annotation.

Examples

Run this code
# NOT RUN {
  d <- data.frame(stringsAsFactors = FALSE, a = c(1, 4), id = c("A", "B"))
  identifying(d$id) <- TRUE
  identifying_columns(d) <- c("id")
# }

Run the code above in your browser using DataLab