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
#' Convert an StackOverflow URL to a local filename | |
#' | |
#' @param url character string, typically starting with | |
#' "https://stackoverflow.com/..." | |
#' @param dir logical, whether this should be a directory or a file | |
#' @param ext character, file extension | |
#' @param create logical, whether to create it or just report on it | |
#' @param force logical, whether to resort to a question number if the | |
#' user cannot be found | |
#' @param base character, the path under which all others will be |
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
#!/bin/bash | |
# gitlabci, v0.2, 2022-01-28 | |
# Run GitLab-CI jobs (e.g., tests, coverage), locally. | |
# (c) 2022 Bill Evans bill@8pawexpress.com | |
# This script is intended to preempt the vicious cycle of: | |
# - Commit. Push. Watch the online CI test fail. | |
# - Commit a small typo. Push. Watch the CI test fail. | |
# - Commit two more characters. Push. Glare at the CI test. | |
# |
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
#' NDC caching for cross-facet plot elements | |
#' | |
#' Useful when using [layout()] and drawing things *between* different | |
#' plots. Motivated by https://stackoverflow.com/q/49464991/3358272. | |
#' | |
#' @details | |
#' | |
#' When adding plot "things" (lines, points, arrows) between facets of | |
#' a `layout` combination, in addition to `x` and `y`, you simply | |
#' provide the plot number within the sequence. (Since this is the |
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
# Simple shiny app that shows most of the headers and env-vars as seen | |
# by the app when visited. | |
# | |
# MIT License | |
# Copyright (c) 2023 Bill Evans <bill@8pawexpress.com> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# Simple plumber api that shows most of the headers and env-vars as seen | |
# by the app when visited. | |
# | |
# MIT License | |
# Copyright (c) 2023 Bill Evans <bill@8pawexpress.com> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
#' Cartesian coordinates per facet-panel | |
#' | |
#' This function mimics the behavior of [ggplot2::coord_cartesian()], | |
#' while supporting per-panel limits when faceted. | |
#' | |
#' @details | |
#' | |
#' A 'panel_limits' data frame may contain: | |
#' | |
#' - zero or more faceting variables, all of which must be found |
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
#' Programmatically produce row-independent `tribble`s | |
#' | |
#' @param x data.frame | |
#' @param max_width integer, the widest normalized width; if data or a | |
#' header is longer than this, it will not be truncated, but it will | |
#' also not be aligned with the others; can be single number (for | |
#' all) or a vector (for each column) | |
#' @param collapse character, the separation text, defaults to `", "` | |
#' @param compact logical, "no undue spaces"; if `TRUE` then sets | |
#' `max_width=0`, `collapse=","`, and disallows prepending |
OlderNewer