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
| library(tibble) | |
| library(ggplot2) | |
| library(dplyr) | |
| library(tidyr) | |
| sim_years <- 7 | |
| start_year <- 2014 | |
| report_pattern <- c(0.25, 0.45, 0.55, 0.75, 0.9, 0.95, 1) | |
| paid_pattern <- c(0.1, 0.25, 0.45, 0.68, 0.85, 0.94, 0.98) | |
| # assuming Poisson with lambda = 100, and Lognormal with mu = 7 and sigma = 2 |
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
| # | |
| # This is a Plumber API. You can run the API by clicking | |
| # the 'Run API' button above. | |
| # | |
| # Find out more about building APIs with Plumber here: | |
| # | |
| # https://www.rplumber.io/ | |
| # | |
| library(plumber) |
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
| # assume tbl is original table | |
| ult_parent <- rep(NA_integer_, nrow(tbl)) | |
| get_parent_id <- function(tbl, id) { | |
| # depends on your implementation | |
| } | |
| is_ult_parent <- function(tbl, id) { | |
| # depends on your implementation | |
| } |
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
| ```{mermaid} | |
| %%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'develop', 'mainBranchOrder': 2}} }%% | |
| gitGraph | |
| commit | |
| branch main | |
| checkout main | |
| commit id: "A" | |
| checkout develop | |
| commit id: "B" | |
| branch rt-add-feature order: 3 |
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
| library(shiny) | |
| prepare_party <- function() { | |
| tags$script( | |
| HTML(' | |
| function replaceBody() { | |
| document.body.innerHTML = "<h1 style=\\"font-family: Gothic Sans; font-size: 20pt; color: blue;\\">HAPPY BIRTHDAY</h1>"; | |
| }; | |
| ') | |
| ) |
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
| library(shiny) | |
| library(reactable) | |
| ui <- fluidPage( | |
| reactableOutput("dummy") | |
| ) | |
| server <- function(input, output, session) { | |
| data <- tibble::tibble(x = letters[1:3], y = 1:3, z = c(3, 7, 11)) | |
OlderNewer