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
gps <- read.csv("out.csv", | |
header = TRUE) | |
library(ggmap) | |
mapImageData <- get_googlemap(center = c(lon = median(gps$Longitude), lat = median(gps$Latitude)), | |
zoom = 11, | |
# size = c(500, 500), | |
maptype = c("terrain")) | |
ggmap(mapImageData, |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<title>Cities I've Been To</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /> | |
<![endif]--> | |
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> |
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
# importing dates: | |
dates <- c("05/27/84", "07/07/05") | |
betterDates <- as.Date(dates, | |
format = "%m/%d/%y") # here you put the format your dates are currently in | |
# it will output the ISO standard dates (%Y-%m-%d) | |
# or: | |
dates <- c("May 27 1984", "July 7 2005") | |
betterDates <- as.Date(dates, |
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(ggplot2) | |
library(scales) | |
# load data: | |
log <- data.frame(Date = c("2013/05/25","2013/05/28","2013/05/31","2013/06/01","2013/06/02","2013/06/05","2013/06/07"), | |
Quantity = c(9,1,15,4,5,17,18)) | |
log | |
str(log) | |
# convert date variable from factor to date format: |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<title>Click Circle</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /> | |
<![endif]--> | |
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> |
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
\documentclass{article} | |
\usepackage{graphicx} | |
\usepackage{caption} | |
\usepackage{subcaption} | |
\begin{document} | |
\begin{figure} | |
\centering |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# cite: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/reshape.html | |
# cite: http://www.cs.grinnell.edu/~rebelsky/Courses/MAT115/2008S/R/stacked-bar-graphs.html | |
# cite: http://www.harding.edu/fmccown/r/#barcharts | |
library(RColorBrewer) | |
sequential <- brewer.pal(6, "BuGn") | |
Loblolly[1:10,] | |
wide <- reshape(Loblolly, |
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(OIdata) | |
library(RColorBrewer) | |
library(classInt) | |
# load state data from OIdata package: | |
data(state) | |
# set constants: | |
nclr <- 8 # number of bins | |
min <- 0 # theoretical minimum |
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
ols <- lm(Temp ~ Solar.R, | |
data = airquality) | |
summary(ols) | |
str(ols) | |
plot(Temp ~ Solar.R, | |
data = airquality) | |
abline(ols) |
NewerOlder