inst/examples/dplyr.R

#' Title: Simple asciicast example
#' Depends: processx (>= 3.4.0), dplyr

# Comments are simply "typed in"
# Commands are typed in as well. They are executed and their output
# is printed:

library(dplyr)

iris %>%
  dplyr::group_by(Species) %>%
  dplyr::summarise_all(mean)

# Here is another command:

starwars %>%
  group_by(species) %>%
  summarise(
    n = n(),
    mass = mean(mass, na.rm = TRUE)
  ) %>%
  filter(n > 1,
         mass > 50)

Try the asciicast package in your browser

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

asciicast documentation built on Dec. 5, 2022, 5:22 p.m.