Learn R Programming

framecleaner (version 0.2.1)

create_flag: create flag

Description

create flag

Usage

create_flag(.data, col, flag, full_name = FALSE, drop = FALSE)

Value

data frame

Arguments

.data

data frame

col

column

flag

column entry

full_name

Logical. default F. if T, new column name is original name + flag. other wise just flag

drop

logical. default F. If T, drop original column.

Examples

Run this code

iris %>%
  create_flag(
  col = Species,
  flag = "versicolor",
  drop = TRUE) %>%
  head()

Run the code above in your browser using DataLab