Man pages for peterhurford/surveytools2
Surveytools2 is a collection of R functions that make working with dplyr on survey analysis just a little bit better. Inspired by dplyr and my previous surveytools package.

add_idsAdds an id column to a given variable.
add_prefix_to_table_namesAdds a prefix to the names of a table.
apply_over_varsApply a function over variables in a dataframe.
breakdownBreakdown values of a variable by the number of people who...
chisq_testReformat stats::chisq.test to accept inputs as two vectors.
comparison_tableCompares a variable across a group, both visually and with an...
count_varsCount the amount of a particlar response that respondents...
cut3Split a vector into bins.
data_summaryPrints a summary of the dataframe.
drop_na_colsDrops columns from the dataframe that meet a certain...
drop_valuesDrop values from a variable.
fish_for_correlationsFish the entire dataframe for correlations. Many will be...
get_namesGets the names of a dplyr postgres table.
get_varsGet the names from a dataframe that match a pattern.
grapes-not_in-grapesAn infix operator for determining if values are not in a...
ignore_by_grepDrops all columns that match lists of regex strings.
is.na_likeDetermines if something is NA or NA-like (blank, the string...
na.rmDeletes all NA and NA-like values from a vector.
nas_are_zerosConvert all NAs in a vector to 0.
num_answersCalculates the number of people that answered a particular...
num_naCalculate the number of NAs in a variable.
num_over_zeroCalculate the number of positive values in a variable.
num_respondentsCalculates the number of total respondents in a dataframe....
print.comparison_tablePrint the table without annoyingly displaying the class.
replaceReplace a value within a dataframe.
response_rateCalculates the response rate to a particular question....
reverse_codeReverse code a variable.
sort.tabSort a tab. When both frequencies and percentages are...
summary_csvCreates a CSV file containing summary information on the...
surveytools2surveytools2.
swap_by_idsRenames values within a dataframe based on ids. Useful for...
swap_by_valueRenames values within a dataframe based on a list of swaps to...
swap_multiple_idsFor all ids specified, sets their value to the assigned value...
tabMakes a fancy table, inspired from 'tab' from STATA.
t_testReformat stats::t.test to accept inputs as two vectors.
var_summaryPrints a summary of the variable.
peterhurford/surveytools2 documentation built on Feb. 18, 2021, 9:13 p.m.