-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reportAgg now allows combined dimension mapping.
- Loading branch information
1 parent
8b7ecb0
commit d95db08
Showing
16 changed files
with
313 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#' Split dimension names | ||
#' | ||
#' Split each entry of a character vector and return one unnested character | ||
#' vector. | ||
#' | ||
#' @author Robin Hasse | ||
#' | ||
#' @param x character vector | ||
#' @param split character used to split \code{x} | ||
#' @returns character vector with each dimension as an own entry | ||
|
||
.split <- function(x, split = "\\.") { | ||
if (is.null(x)) { | ||
return(NULL) | ||
} | ||
unlist(strsplit(x, split)) | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
#' All Combinations of dimension elements | ||
#' | ||
#' @param lst names list of dimension entries | ||
#' @returns character vector with all combinations of the dimension elements | ||
#' each separated by \code{.} | ||
#' | ||
#' @author Robin Hasse | ||
#' | ||
#' @importFrom dplyr everything %>% | ||
#' @importFrom tidyr unite | ||
|
||
.combinations <- function(lst) { | ||
do.call(expand.grid, lst) %>% | ||
unite("combinations", everything(), sep = ".") %>% | ||
getElement("combinations") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.