response_sampler: Randomly sample survey responses

Description Usage Arguments Value Examples

View source: R/response_sampler.R

Description

This

Usage

1
response_sampler(df, text_col, n)

Arguments

df

A dataframe object with

text_col

The column with each response per row

n

The number of responses to sample

Value

A vector of sampled comments from the supplied dataframe.

Examples

1
2
3
4
5
6
7
## Not run: 
data(austensurvey)
austen_2016 <- subset(austensurvey, subset = Year == 2016)
set.seed(100)
rand_2016 <- response_sampler(austen_2016, "Comment", 10)

## End(Not run)

clawilso15/Text.Replace documentation built on Feb. 6, 2021, 5:45 a.m.