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
stat_smooth_func <- function(mapping = NULL, data = NULL, | |
geom = "smooth", position = "identity", | |
..., | |
method = "auto", | |
formula = y ~ x, | |
se = TRUE, | |
n = 80, | |
span = 0.75, | |
fullrange = FALSE, | |
level = 0.95, |
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
# Author: dkulp2 | |
# | |
# Shiny example for dynamically downloading a file related to a specific row. | |
# | |
# A DT datatable is created with options that adds a 'download-control' class to a column with a download icon | |
# and a callback to set up the click event on the 'download-control' cells. | |
# The javascript click event determines which page of the datatable is being displayed and which row the click event occurred. | |
# This approach fails if rows are reordered or the table is filtered, so both are disabled. An alternative is to place the | |
# row ID in a "data-" attribute, which would allow reordering and filtering. | |
# It then sends a Shiny event, 'download-row', with the index of the row in the table. |
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
library(shiny) | |
library(shinyalert) | |
options(digits.secs=6) | |
ui <- fluidPage( | |
useShinyalert(), | |
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
Verifying my Blockstack ID is secured with the address 1B4SvJwaiFR131mvTFNCUoB1HWJKYRzYHy https://explorer.blockstack.org/address/1B4SvJwaiFR131mvTFNCUoB1HWJKYRzYHy |
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
library(shiny) | |
ui <- fluidPage( | |
checkboxInput('yellow.only', 'Yellow Only'), | |
uiOutput('fruit.selection'), | |
DT::dataTableOutput("dt.fruit.selection") | |
) | |
server <- function(input, output) { |
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
# example Shiny app where uiOutput is only rendered when panel is selected, but other | |
# items are dependent on the deferred UI. | |
library(shiny) | |
ui <- fluidPage( | |
tabsetPanel(tabPanel("Main", | |
plotOutput("dots")), | |
tabPanel("Settings", | |
# checkboxInput('even','Even?',TRUE) |
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
library(dplyr) | |
library(ggplot2) | |
fiber.plant.depreciation <- 1395 # per mile | |
insurance <- 442 # per mile | |
bond.fees <- 3 # per pole | |
pole.rental <- 13 # per pole | |
electronics.depreciation <- 63 # per premise | |
routine.mtnce <- 39 # per premise | |
network.operator.base <- 16800 # per town(!) |