inst/doc/intro.R

## -----------------------------------------------------------------------------
library(dplyr)
library(gapminder)

gapminder

## -----------------------------------------------------------------------------
library(widyr)

gapminder %>%
  pairwise_dist(country, year, lifeExp)

## -----------------------------------------------------------------------------
gapminder %>%
  pairwise_dist(country, year, lifeExp) %>%
  arrange(distance)

## -----------------------------------------------------------------------------
gapminder %>%
  pairwise_dist(country, year, lifeExp, upper = FALSE) %>%
  arrange(distance)

## -----------------------------------------------------------------------------
gapminder %>%
  pairwise_cor(country, year, lifeExp, upper = FALSE, sort = TRUE)

Try the widyr package in your browser

Any scripts or data that you put into this service are public.

widyr documentation built on Sept. 13, 2022, 9:05 a.m.