forked from vanderbilt-data-science/ancient-artifacts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path13-load-manuscriptcode
More file actions
53 lines (45 loc) · 1020 Bytes
/
13-load-manuscriptcode
File metadata and controls
53 lines (45 loc) · 1020 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: "MicroTrac Data"
output:
word_document: default
html_document: default
---
# This is the code used by Phyllis for the Johnson, Eberl et. al article
```{r}
dir.create(path = "data")
dir.create(path = "output")
```
```{r}
my_data <- read.csv(file = "Combined MicroTrac.csv", header = TRUE)
```
```{r}
set.seed(1234)
dplyr::sample_n(my_data, 78612)
```
```{r}
curv <- my_data$Curvature
circ <- my_data$Circularity
tran <- my_data$Transparency
angu <- my_data$Angularity
LW <- my_data$LWRatio
soli <- my_data$Solidity
# MANOVA test,
res.man <- manova(cbind(LWRatio, Circularity, Solidity, Transparency, Angularity, Curvature) ~ Type, data = my_data)
summary(res.man)
```
```{r}
summary.aov(res.man)
```
```{r}
plot(angu, LW, main="L/W Ratio by Angularity",
xlab="Angularity", ylab="LW", pch=19)
```
```{r}
library(ggfortify)
library(ggplot2)
```
```{r}
ggplot(data = my_data, aes(angu, LW, color = Type)) +
geom_point() +
scale_color_manual(values = c("Lithic" = "red", "Soil" = "blue"))
```