R/utilities.R

Defines functions n_unique seq_h seq_v

"%||%" <- function(a, b) {
  if (!is.null(a)) a else b
}

seq_v <- function(x) seq(nrow(x))

seq_h <- function(x) seq(ncol(x))

n_unique <- function(x) length(unique(x))

# not exported, need to recreate
# ggname <- function (prefix, grob) 
# {
#   grob$name <- grid::grobName(grob, prefix)
#   grob
# }

Try the ggpol package in your browser

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

ggpol documentation built on Jan. 13, 2021, 12:16 p.m.