plot_cells: Plots tidyxl data frame in a grid layout

Description Usage Arguments Examples

View source: R/plot_cells.R

Description

This function plots the excel sheet, highlighting the relationship between headers and table values.

Usage

1
plot_cells(sheet, text = values, interactive = FALSE)

Arguments

sheet

tidyxl data frame

text

text variable to be represented in values plot.

interactive

TRUE produces an interactive plotly visualisation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
library(tidyverse)

# Create annotated tidyxl data frame
xl_df <-
  locatr_example("worked-examples.xlsx") %>%
  xlsx_cells_fmt(sheets = "pivot-hierarchy") %>%
  append_fmt(fmt_alignment_indent) %>%
  locate_data(data_type == "numeric") %>%
  locate_groups(
    direction = "W",
    .groupings = groupings(fmt_alignment_indent),
    .hook_if = hook_if(any(fmt_alignment_indent == 0))
  ) %>%
  locate(direction = "N", name = student)

# Plot direction annotations
xl_df %>% plot_cells()

## End(Not run)

ianmoran11/locatr documentation built on June 14, 2020, 3:32 a.m.