create_dummy: Creating a new dummy-variable

View source: R/create_dummy.R

create_dummyR Documentation

Creating a new dummy-variable

Description

Creating a new dummy-variable

Usage

create_dummy(data = vaers_2020, name = "newdummy", symptoms)

Arguments

data

A dataset from the vaers datasets in this package (named "vaers_20xx")

name

The name the new variable should have

symptoms

A vector of strings (symptoms) for which the function should search

Value

Returns the input dataset with a new dummy-variable attached

Examples

create_dummy(vaers_2018, "breathlessness", c("Breathlessness"))
create_dummy(data = vaers_2018, name = "breathlessness", symptoms = c("Breathlessness"))
vaers_2020 %>% create_dummy("fatigue", c("Fatigue", "Lethargy", "Somnolence", "Asthenia", "Hypersomnia", "Depressed level of consciousness"))

janoleko/vaers documentation built on Sept. 30, 2022, 11:12 a.m.