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 Nov. 23, 2019, 3:35 a.m.