Learn R Programming

myIO (version 1.2.0)

expand_grouped_df: Expand a grouped data frame into per-group layers

Description

When a grouped_df (from dplyr::group_by()) is passed to addIoLayer(), this function splits the data by group and recursively calls addIoLayer() once per group, assigning auto-colors from the Okabe-Ito palette.

Usage

expand_grouped_df(myIO, type, color, label, data, mapping, transform, options)

Value

The modified myIO widget with one layer per group.

Arguments

myIO

a myIO htmlwidget

type

layer type

color

optional color vector; recycled across groups

label

base label; group values are appended

data

a grouped_df

mapping

aesthetic mapping list

transform

transform name

options

layer options