limpiar_tags: Clean user handles and hashtags

View source: R/limpiar_tags.R

limpiar_tagsR Documentation

Clean user handles and hashtags

Description

Function replaces user handles and hashtags with neutral tags. You can choose whether to replace both hashtags & users or either one.

Usage

limpiar_tags(df, text_var = mention_content, user = TRUE, hashtag = TRUE)

Arguments

df

Name of Data Frame or Tibble object

text_var

Name of text variable/character vector

user

Whether to replace user handles or not TRUE = replace

hashtag

Whether to replace hashtags or not TRUE = replace

Value

The Data Frame or Tibble object with user handles and/or hashtags removed from the text variable

Examples

limpiar_examples

#Both user and hashtags
limpiar_examples %>% limpiar_tags() %>% dplyr::select(mention_content)

#Just user tags
limpiar_examples %>% limpiar_tags(hashtag = FALSE) %>% dplyr::select(mention_content)

#Just hashtags
limpiar_examples %>% limpiar_tags(user = FALSE) %>% dplyr::select(mention_content)


jpcompartir/LimpiaR documentation built on April 6, 2024, 5:22 a.m.