Skip to content

Instantly share code, notes, and snippets.

Avatar

Antoine Soetewey AntoineSoetewey

View GitHub Profile
View mortgage-calculator.R
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
@AntoineSoetewey
AntoineSoetewey / stock_price_covid19.R
Last active Jun 4, 2020
Data manipulation in R to plot active covid19 cases and Apple stock price. See comment in https://www.statsandr.com/blog/data-manipulation-in-r/
View stock_price_covid19.R
# install.packages("quantmod")
library(quantmod)
# devtools::install_github("RamiKrispin/coronavirus", force = TRUE)
library(coronavirus)
# coronavirus dataset
`%>%` <- magrittr::`%>%`
df <- coronavirus %>%
# dplyr::filter(date == max(date)) %>%
dplyr::filter(country == "Indonesia") %>%
View t_table.R
t_table <- function(data, dvs, iv,
var_equal = TRUE,
p_adj = "none",
alpha = 0.05,
paired = FALSE,
wilcoxon = FALSE) {
if (!inherits(data, "data.frame")) {
stop("data must be a data.frame")
}
View how-to-create-a-timeline-of-your-cv-in-r.Rmd
# All packages used below must be installed first
library(devtools)
# devtools::install_github("laresbernardo/lares")
library(lares)
library(ggplot2)
plot_timeline2 <- function(event, start, end = start + 1, label = NA, group = NA,
title = "Curriculum Vitae Timeline", subtitle = "Antoine Soetewey",
size = 7, colour = "orange", save = FALSE, subdir = NA) {
df <- data.frame(
View how-to-embed-a-shiny-app-in-a-r-markdown-document.Rmd
---
title: How to embed a Shiny app in blogdown
author: Antoine Soetewey
date: '2020-01-07'
slug: how-to-embed-a-shiny-app-in-blogdown
categories: []
tags:
- Shiny
- Web
meta_img: blog/how-to-embed-a-shiny-app-in-a-r-markdown-document_files/shiny-app-in-blogdown.jpeg
View optimal-asset-allocation.R
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
View word-cloud.R
library(shiny)
# install.packages("wordcloud2")
library(wordcloud2)
# install.packages("tm")
library(tm)
# install.packages("colourpicker")
library(colourpicker)
ui <- fluidPage(
h1("Word Cloud"),
@AntoineSoetewey
AntoineSoetewey / statistics-201.R
Last active Dec 16, 2020
Shiny app to perform statistical inference on mean(s), proportion(s) and variance(s). https://antoinesoetewey.shinyapps.io/statistics-201/
View statistics-201.R
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
@AntoineSoetewey
AntoineSoetewey / statistics-202.R
Last active Feb 22, 2020
Shiny app for simple linear regression by hand and in R. https://antoinesoetewey.shinyapps.io/statistics-202/
View statistics-202.R
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
library(shiny)
library(ggplot2)
library(plotly)
library(rmarkdown)
library(knitr)