score_calc: Calculate percent positive response for a question in the New...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Calculate percent positive response for a question in the New York City School Survey data

Usage

1
score_calc(df, stub)

Arguments

df

data.frame; s16 or s17

stub

character; The question stub of interest, e.g. "s_q5c", which is the stub for "5c. My teachers will always listen to students' ideas."

Value

A numeric vector of proportions with console output indicating the selected variables

Examples

1
2
3
4
5
## Not run: 
df <- s17
df$test <- score_calc(df,  stub="s_q5c")

## End(Not run)

DerekYves/nycschools documentation built on May 16, 2019, 6:39 p.m.