-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathQuadrat.Rmd
More file actions
38 lines (33 loc) · 1.05 KB
/
Copy pathQuadrat.Rmd
File metadata and controls
38 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: "DB_QuadratSummary"
author: "Douglas Bates"
date: "09/26/2014"
output:
pdf_document:
fig_caption: yes
---
# Reading the data
An initial examination of the data file
```{r input}
str(summ <- read.delim("/afs/cs.wisc.edu/p/stat/Data/MS.exam/s11/DB_QuadratSummary_MSTest.txt"))
```
shows that `Plot`, `Transect` and `Quadrat` should probably be converted to factors and that the last four variables are likely indicators.
```{r}
for (i in 8:11) {print(unique(summ[[i]]))}
```
At this point I would go back and regenerate the dataset
```{r input2}
str(summ <- within(read.delim("/afs/cs.wisc.edu/p/stat/Data/MS.exam/s11/DB_QuadratSummary_MSTest.txt"), {
Plot <- factor(Plot)
Transect <- factor(Transect)
Quadrat <- factor(Quadrat)
X2m_SppPresent <- factor(X2m_SppPresent,labels=c("N","Y"))
X2m_SppBrowsed <- factor(X2m_SppBrowsed,labels=c("N","Y"))
X4m_SppPresent <- factor(X4m_SppPresent,labels=c("N","Y"))
X4m_SppBrowsed <- factor(X4m_SppBrowsed,labels=c("N","Y"))
}))
```
then examine a summary
```{r summary}
summary(summ)
```