keep_one: function to save ove row of data for each unique value of the...

Description Usage Arguments Examples

View source: R/keep_one.R

Description

function to save ove row of data for each unique value of the ID variable. Useful when you want to be sure that you have only one row per level of your ID.

Usage

1
keep_one(data, x, seed = 57)

Arguments

data

is the data

x

is a variable, usually an ID

seed

a seed for consistent randomization

Examples

1
mtcars %>% keep_one(cyl)

Kidapt/keda documentation built on Oct. 12, 2019, 8:37 p.m.