This file contains hidden or 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
STAT 545A Homework#5 | |
======================================================== | |
Yiming Zhang | |
First, loading the Gapminder data and needed packages. | |
```{r} | |
gdURL <- "http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt" | |
gDat <- read.delim(file=gdURL) | |
library(lattice) |
This file contains hidden or 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
STAT 545A Homework#4 | |
======================================================== | |
Yiming Zhang | |
First, loading the Gapminder data and needed packages. | |
```{r} | |
gdURL <- "http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt" | |
gDat <- read.delim(file=gdURL) | |
library(lattice) | |
library(plyr) |
This file contains hidden or 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
STAT 545A Homework#3 | |
======================================================== | |
Yiming Zhang | |
In this exercise, I will mainly use the "plyr" to do some analysis on [Gapminder](http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt) data. | |
First, loading the Gapminder data and needed packages. | |
```{r} |
This file contains hidden or 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
STAT 545A Homework#2 | |
======================================================== | |
Yiming Zhang | |
In this assignment, we will explore some basic features of Gapminder data. | |
First, loading the [Gapminder](http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt) data as well as the needed libraries (for this case, we will only need the lattice library). | |
```{r} | |
gDat <- read.delim("gapminderDataFiveYear.txt") |
This file contains hidden or 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
n <- 55 | |
a <- 2 | |
b <- -3 | |
sigSq <- 0.5 | |
x <- runif(n) | |
y <- a+b*x+rnorm(n,sd=sqrt(sigSq)) | |
(avgX <- mean(x)) | |
plot(x,y) |