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
# Mandelbrot.R | |
# Myles Harrison | |
# everydayanaltics.ca | |
# ------------------- | |
# "Naive" version | |
mandelbrot_naive <- function(xmin=-2, xmax=2, nx=500, | |
ymin=-1.5, ymax=1.5, ny=500, | |
n=100, showplot=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
# mandelbrot_vectorized.R | |
# Myles Harrison | |
# http://www.everydayanalytics.ca | |
# parameters | |
cols <- colorRampPalette(c("blue","yellow","red","black"))(11) | |
xmin = -2 | |
xmax = 2 | |
nx = 500 | |
ymin = -1.5 |
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
# mandelbrot_naive.R | |
# "Naive" implementation of Mandelbrot Set in R | |
# Myles Harrison | |
# http://www.everydayanalytics.ca | |
# parameters | |
cols=colorRampPalette(c("blue","yellow","red","black"))(11) | |
xmin = -2 | |
xmax = 2 | |
nx = 150 |
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
# Toronto Data Science Group Talk plots | |
# Myles Harrison | |
# http://www.everydayanalytics.ca/2014/02/toronto-data-science-group-talk.html | |
library(hexbin) | |
library(RColorBrewer) | |
# Create random data | |
x <- rnorm(5000, mean=1000) | |
y <- rnorm(5000, mean=2000) |
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
# Creepypasta.com stories, Votes vs. Rating | |
# http://www.everydayanalytics.ca/2014/02/creepypasta-learning-ggplot.html | |
library(ggplot2) | |
# Read in the data | |
data <- read.csv(file = 'creepypasta_ratings.csv', header=T, sep=',') | |
# Base Package | |
# Plot |