By signing this contributor license agreement, I understand and agree that this project and contributions to it are public and that a record of the contribution (including all personal information I submit with it, including my full name and email address) is maintained indefinitely and may be redistributed consistent with this project, compliance with the open source license(s) involved, and maintenance of authorship attribution. In order to clarify the intellectual property license granted with Contributions from any person or entity, Bedford Freeman & Worth Pub Grp LLC DBA Macmillan Learning ("Macmillan Learning") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Macmillan Learning; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for Y
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
api_spec <- jsonlite::read_json("R-raw/swagger.json") | |
# I never got to the point of actually using this here, but this is where it is. | |
base_path <- api_spec$servers[[1]]$url | |
methods <- tibble::enframe( | |
x = api_spec$paths, | |
name = "path" | |
) %>% | |
tidyr::unnest_wider(value) %>% |
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
# Adapted from https://rpodcast.shinyapps.io/modules_article1/ to test callModule as a function. | |
# load packages | |
library(shiny) | |
library(AmesHousing) | |
library(dplyr) | |
library(rlang) | |
library(ggplot2) | |
library(scales) |
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
# (?<= ) means "look for a space before this, but don't include it in what we | |
# extract." | |
# Square brackets mean "look for any of these", so [a-z() ] means "look for | |
# lowercase letters, parentheses, or spaces." | |
# The plus sign means "find at least one of these." | |
# The dollar sign means "this has to occur at the end of the text." | |
target <- "(?<= )[a-z() ]+$" | |
commute_mode %>% | |
dplyr::mutate( |
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
frink <- magick::image_read( | |
"https://jeroen.github.io/images/frink.png" | |
) | |
bitmap <- frink[[1]] | |
radius <- 20 | |
x_seq <- seq_len(dim(bitmap)[[2]]) | |
y_seq <- seq_len(dim(bitmap)[[3]]) | |
center_x <- median(x_seq) | |
center_y <- median(y_seq) | |
for(x in x_seq) { |