davidhodge931 / ggblanket

Simplify ggplot2 visualisation
https://davidhodge931.github.io/ggblanket/
Other
156 stars 8 forks source link

x_orientation/y_orientation: add args within `gg_*` #878

Closed davidhodge931 closed 4 months ago

davidhodge931 commented 4 months ago
if (!rlang::is_null(x_orientation) & !rlang::is_null(y_orientation)) {
  rlang::abort("x_orientation & y_orientation cannot both be TRUE")
}  
else if (!rlang::is_null(x_orientation) & rlang::is_null(y_orientation)) {
  if (x_orientation) flipped <- FALSE
  else flipped <- TRUE
}
else if (rlang::is_null(x_orientation) & !rlang::is_null(y_orientation)) {
  if (y_orientation) flipped <- FALSE
  else flipped <- TRUE
}
else {

}
davidhodge931 commented 4 months ago

*_orientation is a way to avoid namespace collision

davidhodge931 commented 4 months ago

Sorted :)