knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)

source("man/figures/hexsticker.R")

rthop

Lifecycle: experimental R build status

A set of top functions.

Install

remotes::install_github("th1460/rthop")

Install dependencies

remotes::install_github("rCarto/photon")

Examples

Frequency analysis (freq)

library(rthop)
library(dplyr)

dataset <- 
  titanic::titanic_train %>% 
  select(Survived, Pclass, Sex, Embarked) %>% 
  filter(Sex != "", Embarked != "") %>% 
  mutate_all(as.factor)

c("Survived", "Pclass", "Sex", "Embarked") %>% 
  purrr::map_dfr(~ freq(dataset, !! rlang::sym(.x)))

Contigency tables (crosstab)

c("Pclass", "Sex", "Embarked") %>%
  purrr::map_dfr(~ crosstab(dataset, !! rlang::sym(.x), Survived))

Transforme CEP in geographic coordinate (cep2coo)

c("20950240", "20090003", "22230090") %>% 
  purrr::map_dfr(~cep2coo(.x))


th1460/rthop documentation built on July 10, 2020, 8:19 p.m.