gs_inspect: Visual overview of populated cells

Description Usage Arguments Value Examples

Description

This function is still experimental. Expect it to change! Or disappear? This function plots a data.frame and gives a sense of what sort of data is where (e.g. character vs. numeric vs factor). Empty cells (ie. NA's) are also indicated. The purpose is to get oriented to sheets that contain more than one data rectangle. Right now, due to the tabular, data-frame nature of the input, we aren't really conveying when disparate data types appear in a column. That might be something to work on in a future version, if this proves useful. That would require working with cell-by-cell data, i.e. from the cell feed.

Usage

1

Arguments

x

data.frame or tbl_df

Value

a ggplot object

Examples

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

# data recorded from a game of ultimate frisbee
ulti_key <- "1223dpf3vnjZUYUnCM8rBSig3JlGrAu1Qu6VmPvdEn4M"
ulti_ss <- ulti_key %>% gs_key()
ulti_dat <- ulti_ss %>% gs_read()
gs_inspect(ulti_dat)

# totally synthetic example
x <- suppressWarnings(matrix(0:1, 21, 21))
x[sample(21^2, 10)] <- NA
x <- as.data.frame(x)
some_columns <- seq(from = 1, to = 21, by = 3)
x[some_columns] <- lapply(x[some_columns], as.numeric)
gs_inspect(x)

## End(Not run)

googlesheets documentation built on May 2, 2019, 1:57 p.m.