knitr::opts_chunk$set(echo = TRUE)

This is a package of practical things I use every day. Thus, it is not really community oriented.

edouaRd can be installed from Github :

# install.packages("devtools")
devtools::install_github("edouardschuppert/edouaRd")

povertext

povertext deplete your text, it deletes any accents or umlaut.

library(edouaRd, quietly = TRUE)

povertext(c("Père Noël", "Où êtes-vous ?"))

wordfrequency, bigramfrequency & hashtagfrequency

wordfrequency splits character strings into words and classifies them, so you know which ones are the most used. bigramfrequency does the same thing, but with bigrams. hashtagfrequency does the same thing, but with the hashtags. The possibility is offered to keep only part of this data.

suppressPackageStartupMessages(library(tidyverse))

edouaRd::rstats %>% 
  wordfrequency(text)

edouaRd::rstats %>% 
  hashtagfrequency(text, slice = 30, original = TRUE)

edouaRd::rstats %>% 
  bigramfrequency(text, slice = 50)

datetimes_fr & dates_fr

datetimes_fr turn your datetimes into a french format. dates_fr does the same thing, with only the dates. Please note that this is NOT a useful format to work with R. This function can only be used with a purpose of report, in order to have a very understandable format.

Sys.time()

datetimes_fr(Sys.time())

dates_fr(Sys.time())

distribution_time

distribution_time is used to check the temporal distribution of a dataset.

edouaRd::rstats %>% 
  distribution_time(created_at, granularity = "hour")

With the draw argument, this distribution can be expressed more visually.

edouaRd::rstats %>% 
  distribution_time(created_at, granularity = "hour", draw = TRUE)

rm_empty_cols

rm_empty_cols allows to delete the columns of an array containing only NAs.

edouaRd::rstats

rm_empty_cols(edouaRd::rstats)

Please report issues and suggestions to the issues tracker.



edouardschuppert/edouaRd documentation built on June 12, 2021, 2:22 a.m.