VarActionSearch: Frequency of specifics events in a variable of Actions

View source: R/VarActionSearch_m2.R

VarActionSearchR Documentation

Frequency of specifics events in a variable of Actions

Description

This is a function that locates specific events (using the actions.search argument) and create new variables associate with this strategy.

Usage

VarActionSearch(data, action.var, actions.search)

Arguments

data

A matrix or data.frame where the 'action.var' variable is

action.var

a vector with actions. See DataActionsbyID function.

actions.search

A character vector with the actions to be searched.

Value

This function returns a data.frame with the frequency of each specific events from the actions.search argument and "Freq.Actions.Search" summary.

Examples

# Counting the instances of top_setting == 1
df <- m2$VarActionSearch(cp025q01.treated, "CP025Q01.ACTIONS", "1_apply")
table(df$freq.1_apply) # checking results


LOGAN documentation built on Oct. 25, 2022, 9:08 a.m.

Related to VarActionSearch in LOGAN...