This file contains hidden or 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
| #' Column selector for `[` and `[[` | |
| #' | |
| #' @param ... Column names provided as `character` or `symbol` (could be | |
| #' extended to allow other inputs!) | |
| #' @return A `numeric` vector of column indices to select | |
| #' | |
| #' @examples | |
| #' mtcars[cols(cyl, wt)] |> head() | |
| #' | |
| #' mtcars[cols(mpg:wt)] |> head() |
This file contains hidden or 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
| # Contributor License Agreement (CLA) | |
| By agreeing to this license agreement, you are agreeing to | |
| permit @dgkf to relicense this project, which may include | |
| your contributions of code, discussions, review or ideas, | |
| without your approval. | |
| # Why? | |
| Licensing languages is tricky and I haven't researched which |
This file contains hidden or 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
| using DataFrames, CSV | |
| df_exports = DataFrame(name = names(DataFrames)) | |
| # pull all objects from DataFrames namespace | |
| df_exports[:,:obj] .= map(eachrow(df_exports)) do row | |
| getfield(DataFrames, row.name) | |
| end | |
| # get object types |
This file contains hidden or 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
| #' Right-associative operator for function decoration | |
| #' | |
| #' @description Decorating a function wraps the body of the inner function in a | |
| #' decorator function, allowing for insertion of code before or after the body | |
| #' of the inner function call. | |
| #' | |
| #' @param d the decorating function to wrap function \code{f} | |
| #' @param f the function to decorate | |
| #' | |
| #' @return a new function call, functionally equivalent to the decorated |