Skip to content

Commit 3404c4c

Browse files
committed
update readme with generate_shams and keep_backchannel
1 parent 34a2748 commit 3404c4c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.Rmd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ knitr::kable(head(MaronGross_2013, 10), format = "pipe")
127127
- `omit_stops` T/F (default=T) option to remove stopwords
128128
- `lemmatize` T/F (default=T) lemmatize strings converting each entry to its dictionary form
129129
- `which_stoplist` quoted argument specifying stopword list to apply, options include `none`, `MIT_stops`, `SMART_stops`, `CA_OriginalStops`, or `Temple_stops25`. Default is `Temple_stops25`.
130+
- `remove_backchannel` T/F (default=F) option to preserve turns composed entirely of stopwords as NAs (when false) or remove the turn by 'squishing' the turns immediately preceding and following together.
130131
```{r, eval=F, message=F, warning=F}
131132
NurseryRhymes_Prepped <- prep_dyads(dat_read=NurseryRhymes, lemmatize=TRUE, omit_stops=T, which_stoplist="Temple_stops25")
132133
```
@@ -153,12 +154,25 @@ colnames(MarySumDat)
153154
knitr::kable(head(MarySumDat, 10), format = "simple", digits = 3)
154155
```
155156

157+
# Optional: Generate sham conversations
158+
## `generate_shams()`
159+
Some research questions may benefit from the use of control conversations that lack the temporal continuity found in real transcripts. ``generate_shams`` shuffles each individual interlocutor's time series, producing a corpus of conversations consisiting of the same production, but in a random order. This provides a control to compare with real corpus summary statistics.
160+
### <span style="color: darkred;">Arguments to `generate_shams()`:</span>
161+
- `dat_prep` dataframe created by ``prep_dyads()``function <br>
162+
- `seed` a number to supply as a seed for reproducible sampling <br>
163+
164+
```{r}
165+
MaryShams <- generate_shams(df_prep = NurseryRhymes_Prepped, seed = 202)
166+
knitr::kable(head(MaryShams, 10), format = "simple", digits = 3)
167+
```
168+
156169
# Optional: Generate corpus analytics
157170
## `corpus_analytics()`
158171
It is often critical to produce descriptives/summary statistics to characterize your language sample. This is typically a laborious process. ``corpus_analytics`` will do it for you, generating a near publication ready table of analytics that you can easily export to the specific journal format of your choice using any number of packages such as `flextable` or `tinytable`.
159172

160173
### <span style="color: darkred;">Arguments to `corpus_analytics()`:</span>
161174
- `dat_prep` dataframe created by ``prep_dyads()``function <br>
175+
162176
```{r, eval=T, warning=F, message=F}
163177
NurseryRhymes_Analytics <- corpus_analytics(dat_prep=NurseryRhymes_Prepped)
164178
knitr::kable(head(NurseryRhymes_Analytics, 10), format = "simple", digits = 2)

0 commit comments

Comments
 (0)