Skip to content

Instantly share code, notes, and snippets.

Stat545A: Homework 05
========================================================
```{r}
gDat <- read.delim("gapminderDataFiveYear.txt")
#drop Oceania
gDat <- droplevels(subset(gDat, continent!="Oceania"))
```
Homework04
========================================================
```{r echo=FALSE}
library(stringr)
library(Cairo)
library(xtable)
library(plyr)
library(lattice)
```
The goal of this assignment is to produce figures to accompany data aggregation tasks in homework 3. Note for this assignment I dropped Oceania right from the beginning.
Homework03
========================================================
```{r echo=FALSE}
library(stringr)
library(xtable)
library(plyr)
```
This homeork assignment is an excercise in data aggregation with a focus on writing code that is clean and readable.
```{r}
# read from internet
```{r include=FALSE}
gDat <- read.delim("http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt")
```
STAT545A Homework 2
========================================================
This report documents some preliminary explorations of the Gapminder data as provided in [gapminderDataFiveYear.txt](http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt).
Data Structure
---------------
a <- 2
b <- -3
sigSq <- 0.5
x <- runif(40)
y <- a+b*x+rnorm(40,sd=sqrt(sigSq))
(avgX <- mean(x))
write(avgX, "agX.txt")
plot(x, y)
abline(a, b, col = "purple")