Skip to content

Instantly share code, notes, and snippets.

View mtaylor-semo's full-sized avatar

Michael S. Taylor mtaylor-semo

  • Southeast Missouri State University
  • Cape Girardeau, Missouri
View GitHub Profile
@mtaylor-semo
mtaylor-semo / 420_phyllotaxis.R
Last active February 3, 2019 00:20
Contemplating the meaning of life
# Based on https://chichacha.netlify.com/2019/01/29/playing-around-with-phyllotactic-spirals/
library(tidyverse) ## for pretty much everything...
phi <- (1 + sqrt(5)) / 2
golden_angle <- pi*(3-sqrt(5))
create_art <- function(n=1800,u=5,v=0,angle=golden_angle,colors="#ffffff",...){
my_colours <- colors ## default is using one colour, white, but I can use vector of colours too.
@mtaylor-semo
mtaylor-semo / blacklight_ctenophore.R
Last active February 2, 2019 20:25
Blacklight Ctenophore
# Inspired by https://twitter.com/aschinchon/status/1090724402881314819
# Colors https://www.colourlovers.com/palette/565792/glow!!!!!!!!!!!!!!!!
library(tidyverse)
p1 <- seq(from = -5, to = 5, by = 0.02) %>%
expand.grid(x = ., y = .) %>%
ggplot() +
geom_point(aes(y = (y + (1-cos(x)^3)),
x = (x + (1-sin(y))^3)),
alpha = 0.05,
t-test Shiny App
Base R code created by Jimmy Wong
Shiny app files created by Jimmy Wong
Cal Poly Statistics Dept Shiny Series
http://statistics.calpoly.edu/shiny
@mtaylor-semo
mtaylor-semo / gist:cdf10b33dc94a53000f7f78f09910c9f
Created January 19, 2019 13:26 — forked from jrnold/gist:6799152
Create a plot of the normal distribution with an area shaded in. Useful for teaching z-scores and stuff like that.
library("ggplot2")
#' Draw Normal Distribution Density with an area shaded in.
#'
#' @param lb Lower bound of the shaded area. Use \code{-Inf} for a left tail.
#' @param ub Upper bound of the shaded area. Use \code{Inf} for a right tail.
#' @param mean Mean of the normal distribution
#' @param sd Standard deviation of the normal distribution
#' @param limits Lower and upper bounds on the x-axis of the area displayed.
#' @return ggplot object.