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
Stat545A: Homework 05 | |
======================================================== | |
```{r} | |
gDat <- read.delim("gapminderDataFiveYear.txt") | |
#drop Oceania | |
gDat <- droplevels(subset(gDat, continent!="Oceania")) | |
``` | |
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
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. |
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
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 |
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
```{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 | |
--------------- |
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
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") |