Advanced Statistics - Biology 6030

Bowling Green State University, Fall 2017

Lab Exercise 2 for R: Descriptive Statistics

Exercise 1:

> trees <- read.table("http://caspar.bgsu.edu/~courses/stats/Labs/Datasets/TreesU.txt", sep="\t", header=T, na.strings = ".")
> write.table(trees)

> names(trees)

Exercise 2:

> xtabs(~Name, data = trees)
> summary(trees$Diam)
> mean(trees$Diam, na.rm=TRUE)

> install.packages("pastecs"); library(pastecs)
> options(digits=4)
> stat.desc(trees)

> install.packages("psych"); library(psych)
> describe(trees)
> install.packages("Hmisc"); library(Hmisc)
> describe(trees)

This reports descriptive stats for tree species subgroups

> describeBy(trees$Diam, group = trees$Name)


Exercise 3:


> qqnorm(trees$Diam)
> qqline(trees$Diam,col="red")



last modified: 2/2/15
This material is copyrighted and MAY NOT be used for commercial purposes, 2001-2017 lobsterman.
[ Advanced Statistics Course page | About BIO 6030 | Announcements ]
[ Course syllabus | Exams & Grading | Glossary | Evaluations | Links ]