preprocess_wc_generation: Takes a data frame column, generates a corpus, preprocesses...

Description Usage Arguments Value Examples

View source: R/free_text_wordcloud.R

Description

This function is used within free_text_wordcloud. It uses the tm package to create a corpus, apply preprocessing and create a Term Document Matrix. Then wordcloud2 is used to create the word cloud.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
preprocess_wc_generation(
  text_col,
  lang_wc_c,
  df_c = df,
  lang_c = lang,
  svc_c = svc,
  df_schema_ext_c = df_schema_ext,
  choice_col_c = choice_col,
  label_col_c = label_col
)

Arguments

text_col

Character or Character vector (if multiple questions shall be examined) that specifies the names of the columns of the free text questions.

lang_wc_c

Character that specifies the language of the answers of the free text question. Check stopwords to find out more about stopwords list options.

df_c

Data frame containing the ODK data that is to be used. Optional, defaults to df which is the df parsed in free_text_wordcloud.

lang_c

Character containing the name of the language that is to be examined.

svc_c

Logical that specifies whether the data is coming directly from ODK or not.

df_schema_ext_c

Data frame that defines the schema of the from. Can be passed to the function to avoid downloading it multiple times. Optional, defaults to NULL.

choice_col_c

String specifying the choices column that is to be changed, defaults to NULL.

label_col_c

String specifying the labels column that is to be changed, defaults to NULL.

Value

wordcloud2 html-widget

Examples

1
2
3
4
## Not run: 
Function is only used within free_text_wordcloud(). See the latter for example.

## End(Not run)

lucidviews/repvisForODK documentation built on Feb. 13, 2022, 9:50 p.m.