-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
512 lines (512 loc) · 18 KB
/
.Rhistory
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
facet_wrap (~ Behavior) +
geom_text(aes(label= P.Value, x= Species, y= P.Value), vjust= -0.6) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 6.5)) +
labs(caption= "Figure 1: Is Hand Preference Independent of Individual?") +
scale_fill_manual(values = c("#C84E00", "#E89923", "#1D6363"))
ggplot(by_focal, aes(x= Species, y= P.Value, fill = Species)) +
geom_bar(stat= 'identity', color = "black") +
theme_classic()+
xlab("Species of Lemur") +
ylab("P-Value (less than 0.05 is significant)") +
facet_wrap (~ Behavior) +
geom_text(aes(label= P.Value, x= Species, y= P.Value), vjust= -0.6) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 7)) +
labs(caption= "Figure 1: Is Hand Preference Independent of Individual?") +
scale_fill_manual(values = c("#C84E00", "#E89923", "#1D6363"))
ggplot(by_species, aes(x= Behavior, y= P.Value)) +
geom_bar(stat= 'identity', color = "black", fill = "#988675") +
theme_classic()+
xlab("Behavior") +
ylab("P-Value (less than 0.05 is significant)") +
geom_text(aes(label= P.Value, x= Behavior, y= P.Value), vjust= -0.5) +
theme(text = element_text(size = 20)) +
theme(axis.text.x = element_text(size = 10)) +
labs(caption= "Figure 3: Is Hand Preference Independent of Species?")
ggplot(by_species, aes(x= Behavior, y= P.Value)) +
geom_bar(stat= 'identity', color = "black", fill = "#DAD0C6") +
theme_classic()+
xlab("Behavior") +
ylab("P-Value (less than 0.05 is significant)") +
geom_text(aes(label= P.Value, x= Behavior, y= P.Value), vjust= -0.5) +
theme(text = element_text(size = 20)) +
theme(axis.text.x = element_text(size = 10)) +
labs(caption= "Figure 3: Is Hand Preference Independent of Species?")
ggplot(by_species, aes(x= Behavior, y= P.Value)) +
geom_bar(stat= 'identity', color = "black", fill = "#DAD0C6") +
theme_classic()+
xlab("Behavior") +
ylab("P-Value (less than 0.05 is significant)") +
geom_text(aes(label= P.Value, x= Behavior, y= P.Value), vjust= -0.5) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 10)) +
labs(caption= "Figure 3: Is Hand Preference Independent of Species?")
table(left_fg$Species)
left_fg <-
l_foodGrasps %>%
filter(Side == "L")
table(left_fg$Species)
right_fg <-
l_foodGrasps %>%
filter(Side == "R")
table(right_fg$Species)
table(left_fg$Species)
left_fg <-
l_foodGrasps %>%
filter(Side == "L")
table(left_fg$Species)
right_fg <-
l_foodGrasps %>%
filter(Side == "R")
table(right_fg$Species)
table(right_fg$Species)
table(left_fg$Individual)
table(left_fg$Individual)
table(right_fg$Individual)
table(left_rg$Species)
table(right_rg$Species)
library(tidyverse)
library(readr)
library(dplyr)
library(ggplot2)
L_PreClean <- read.csv("~/Documents/GitHub/Lefty_Lemurs/LeftyLemurs_Original.csv")
summary(L_PreClean)
L_PreClean <- rename(L_PreClean, Troop = Troop.............A..B..C..D...., Time = Time..H.M.S., Note = Focal.sample.note......................................................................................................................................................please.include.as.much.detail.as.possible...If.a.note.is.about.a.grooming.bout..for.example..include.stop.time.in.the.same.cell.)
L_PreClean$Category <- str_replace(L_PreClean$Category, ",", "")
L_PreClean$Category = toupper(L_PreClean$Category)
L_HFdata <-
L_PreClean %>%
filter(str_detect(Category, "RH|RF|LH|LF"))
# do not run
# lefty_justEthogram <-
# L %>% select(Category) %>%
# filter(str_detect(Category, "BP|QP|L|AG|SG|F|E|CL|HC|R|G|"))
# do not run: L_HFdata$Limb <- L_PreClean$Category
# do not run: L_PreClean2 <- L_PreClean %>% relocate (Limb, .before = Note)
# do not run: lefty_split <- L_PreClean2$Category <- str_replace(L_PreClean$Limb, "BP|QP|L|AG|SG|F|E|CL|HC|R|G|", "")
# do not run: lefty_fullsplit <- L_PreClean2$Limb <- str_replace(L_PreClean$Category, "LF|LH|RF|RH|", "")
# write_csv(L_PreClean,"Lefty_Lemurs.csv")
L <- read.csv("~/Documents/GitHub/Lefty_Lemurs/LeftyLemurs_Clean.csv")
head(L)
table(L$Limb)
ggplot (L, aes(x= reorder (Limb, Limb, table ))) +
geom_bar(color = "black", fill = "#012169") +
theme_classic() +
xlab("Limb") +
ylab("Total Times Using Each Limb") +
ggtitle("Total Limb Use Across Lemurs") +
coord_flip()
ggplot (L, aes(x= reorder (Limb, Limb, table ))) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Limb") +
ylab("Total Times Using Each Limb") +
ggtitle("Total Limb Use Across Lemur Species") +
coord_flip() +
facet_wrap (~ Species, scales = "free")
ggplot (L, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Limb Use Between Lemur Species") +
facet_wrap (~ Species, scales = "free")
ggplot (L, aes(x= reorder (Side, Side, table ))) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right") +
ylab("Total Times Using Each Limb") +
ggtitle("Limb Use Between Lemur Species") +
coord_flip() +
facet_wrap (~ Species, scales = "free")
ggplot (L, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Limb Use Between Lemur Species") +
facet_wrap (~ Species,)
ggplot (L, aes(x = reorder (Limb, Limb, table ))) +
geom_bar(color = "black", fill = "#1D6363") +
theme_classic() +
xlab("Limb") +
ylab("Total Times Using Each Limb") +
ggtitle("Total Limb Use Between Sexes: Lemurs Are Not Lefties") +
coord_flip() +
facet_wrap (~ Sex, scales = "free")
ggplot (L, aes(x= reorder (Side, Side, table ))) +
geom_bar(color = "black", fill = "#1D6363") +
theme_classic() +
xlab("Left or Right") +
ylab("Total Times Using Each Limb") +
ggtitle("Total Limb Use Between Sexes: Lemurs Are Not Lefties") +
coord_flip() +
facet_wrap (~ Sex, scales = "free")
ggplot (L, aes(x= reorder (Category, Category, table ))) +
geom_bar(color = "black", fill = "#0577B1") +
theme_classic() +
xlab("Type of Behavior") +
ylab("Total Times Using Each Limb") +
ggtitle("Behavior Across Sexes") +
coord_flip() +
facet_wrap (~ Sex,scales = "free")
summary(L)
library(psych)
describeBy(L[c(4,1:12)], group = "Category")
# take out feet use data
l_hands <-
L %>%
select(H.F) %>%
filter(str_detect(H.F, "H"))
# add the other stuff back
l_hands <- inner_join(l_hands, L, by = "H.F")
l_hands <- unique(l_hands)
# actually I also don't want to look at all the categories bc some were added just for fun and are probably not important
l_handstuff <-
l_hands %>%
select(Category) %>%
filter(str_detect(Category, "E|L|R|SG"))
# WHY WON'T IT TAKE OUT LA
# add the other stuff back why did it even go away
l_handstuff <- inner_join(l_handstuff, l_hands, by = "Category")
# I can remove the H.F row because all of it is hand
l_handstuff <- l_handstuff %>% select(-H.F)
# removing Limb row bc side says the same thing
l_handstuff <- l_handstuff %>% select(-Limb)
# removing mystery duplicates
l_handstuff <- unique(l_handstuff)
l_noLA <-
l_handstuff %>%
filter(Category == "E" | Category == "L" | Category == "R" | Category == "SG" | Category != "LA" )
#wow I forgot you can do that
ggplot (l_noLA, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use Between Lemur Species") +
facet_wrap (~ Species, scales = "free")
ggplot (l_noLA, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("Type of Behavior") +
ggtitle("Hand Use Between Behaviors") +
facet_wrap (~ Category, scales = "free")
l_grasps <-
l_noLA %>%
filter(Category == "E" | Category == "L" | Category == "R")
ggplot (l_grasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Grasping Between Lemur Species") +
facet_wrap (~ Species, scales = "free")
ggplot (l_grasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Grasping Between Sexes") +
facet_wrap (~ Sex, scales = "free")
l_foodGrasps <-
l_grasps %>%
filter(Category == "E")
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Food Grasping Between Lemur Species") +
facet_wrap (~ Species, scales = "free")
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Food Grasping Between Individuals") +
facet_wrap (~ Focal, scales = "free")
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Food Grasping Between Individuals") +
facet_wrap (~ Focal)
ggplot (l_noLA, aes(x= Category)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Activity") +
ylab("Occurrences") +
ggtitle("Hand Use for Activities by Species") +
facet_wrap (~ Species)
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Activity") +
ylab("Occurrences") +
ggtitle("Hand Used for Food Grasping Between Species") +
facet_wrap (~ Species)
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Grasping Between Individuals") +
facet_wrap (~ Focal, scales = "free" )
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Side") +
ylab("Occurrences") +
ggtitle("Hand Used for Food Grasping Between Species") +
facet_wrap (~ Species)
ggplot (L, aes(x= Focal)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Focal") +
ylab("Occurrences") +
ggtitle("# of Times Using Each Limb") +
facet_wrap (~ Side)
ggplot (l_foodGrasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Side") +
ylab("Occurrences") +
ggtitle("Hand Used for Food Grasping Between Sex") +
facet_wrap (~ Sex, scales = "free")
L %>%
group_by(Side) %>%
summarise (n = n()) %>%
mutate(proportion = n / sum(n))
l_handstuff %>%
group_by(Side) %>%
summarise (n = n()) %>%
mutate(proportion = n / sum(n))
binom.test(218, 305, p = .75, alternative = "two.sided")
# tbl_handGrasps <- as.data.frame(l_noLA) %>%
# group_by(Side, Sex) %>%
# summarize(qty = sum(Freq)) %>%
# ungroup() %>%
# spread(key = Sex, value = qty)
# mat_handGrasps <- as.matrix(tbl_handGrasps[-1])
# rownames(mat_handGrasps) <- levels(tbl_handGrasps$Side)
# chisq.test(mat_handGrasps)
ggplot (l_grasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Grasping Between Sexes") +
facet_wrap (~ Sex, scales = "free")
#I echo: false
ggplot (L, aes(x= Limb)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Limb") +
ylab("# of Times Using Each Limb") +
ggtitle("Limb Use Between Individuals") +
facet_wrap (~ Focal)
l_feet <-
L %>%
filter(Category == "BP")
ggplot (l_feet, aes(x= Limb)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Limb") +
ylab("# of Times Using Each Limb") +
ggtitle("Foot Use Between Individuals") +
facet_wrap (~ Focal)
ggplot(L, aes(x = Category, y = Age, color = Side)) +
geom_jitter() +
theme_classic() +
xlab("Type of Behavior") +
ylab("Age of Lemur") +
ggtitle("Does Age Affect Limb Use?") +
scale_color_manual(values = c("#1D6363", "#E89923"))
ggplot (l_noLA, aes(x= Category, fill = Side)) +
geom_bar(color = "black") +
theme_classic() +
xlab("Type of Behavior") +
ylab("# of Times Using Each Limb") +
ggtitle("Limb Use Between Lemur Species") +
facet_wrap (~ Species, scales = "free") +
scale_fill_manual(values = c("#1D6363", "#E89923"))
ggplot (l_noLA, aes(x= Side, fill = interaction(Category, Side))) +
geom_bar(color = "black") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Limb Use Between Lemur Species") +
facet_wrap (~ Species, scales = "free")
write_csv (l_grasps, "HandGrasps.csv")
table(l_grasps$Side, l_grasps$Species)
chisq.test(table(l_grasps$Side, l_grasps$Species))
table(l_grasps$Side, l_grasps$Sex)
chisq.test(table(l_grasps$Side, l_grasps$Sex))
table(l_grasps$Side, l_grasps$Focal)
chisq.test(table(l_grasps$Side, l_grasps$Focal))
table(l_grasps$Side, l_grasps$Category)
chisq.test(table(l_grasps$Side, l_grasps$Category))
table(l_grasps$Side, l_grasps$Age)
chisq.test(table(l_grasps$Side, l_grasps$Age))
ggplot (l_grasps, aes(x= Side)) +
geom_bar(color = "black", fill = "#C84E00") +
theme_classic() +
xlab("Left or Right Side") +
ylab("# of Times Using Each Limb") +
ggtitle("Hand Use for Grasping Between Individuals") +
facet_wrap (~ Focal, scales = "free")
l_foodGrasps <-
l_grasps %>%
filter(Category == "E")
l_locGrasps <-
l_grasps %>%
filter(Category == "L")
l_RestGrasps <-
l_grasps %>%
filter(Category == "R")
left_fg <-
l_foodGrasps %>%
filter(Side == "L")
table(left_fg$Focal)
right_fg <-
l_foodGrasps %>%
filter(Side == "R")
table(right_fg$Focal)
left_fg <-
l_foodGrasps %>%
filter(Side == "L")
table(left_fg$Species)
right_fg <-
l_foodGrasps %>%
filter(Side == "R")
table(right_fg$Species)
table(left_fg$Sex)
table(right_fg$Sex)
library(RVAideMemoire)
FG_Sifaka <- matrix(c(3, 6, 2, 7, 32, 21, 16, 16), nrow = 4, ncol = 2, byrow = T)
rownames(FG_Sifaka) <- c('Furia', 'Gisela', 'Thrax', 'Rupert')
colnames(FG_Sifaka) <- c('Freq_L', 'Freq_R')
G.test(FG_Sifaka)
FG_Mongoz <- matrix(c(28, 6, 9, 19, 4, 14, 1, 9), nrow = 4, ncol = 2, byrow = T)
rownames(FG_Mongoz) <- c('Rico', 'Carolina', 'Duggan', 'Maddie')
colnames(FG_Mongoz) <- c('Freq_L', 'Freq_R')
G.test(FG_Mongoz)
FG_lcat <- matrix(c(9, 1, 10, 23, 0, 47, 16, 19 ), nrow = 4, ncol = 2, byrow = T)
rownames(FG_lcat) <- c('Sophia', 'Sierra Mist', 'Randy', 'Licinius')
colnames(FG_lcat) <- c('Freq_L', 'Freq_M')
G.test(FG_lcat)
left_rg <-
l_RestGrasps %>%
filter(Side == "L")
table(left_rg$Focal)
right_rg <-
l_RestGrasps %>%
filter(Side == "R")
table(right_rg$Focal)
RG_Sifaka <- matrix(c(7, 4, 16, 16, 8, 11, 16, 22), nrow = 4, ncol = 2, byrow = T)
rownames(RG_Sifaka) <- c('Furia', 'Gisela', 'Thrax', 'Rupert')
colnames(RG_Sifaka) <- c('Freq_L', 'Freq_M')
G.test(RG_Sifaka)
RG_Mongoz <- matrix(c(2, 4, 1, 3, 0, 0, 1, 5), nrow = 4, ncol = 2, byrow = T)
rownames(RG_Mongoz) <- c('Rico', 'Carolina', 'Duggan', 'Maddie')
colnames(RG_Mongoz) <- c('Freq_L', 'Freq_M')
G.test(RG_Mongoz)
FG_lcat <- matrix(c(0, 0, 0, 2, 0, 0, 1, 7), nrow = 4, ncol = 2, byrow = T)
rownames(FG_lcat) <- c('Sophia', 'Sierra Mist', 'Randy', 'Licinius')
colnames(FG_lcat) <- c('Freq_L', 'Freq_M')
G.test(FG_lcat)
left_grasps <-
l_grasps %>%
filter(Side == "L")
table(left_grasps$Focal)
right_grasps <-
l_grasps %>%
filter(Side == "R")
table(right_grasps$Focal)
g_sifaka <- matrix(c(67, 71, 35, 37), nrow = 2, ncol = 2, byrow = T)
rownames(g_sifaka) <- c('Males', 'Females')
colnames(g_sifaka) <- c('Freq_L', 'Freq_R')
fisher.test(g_sifaka)
g_mongoz <- matrix(c(21, 35, 10, 31), nrow = 2, ncol = 2, byrow = T)
rownames(g_mongoz) <- c('Males', 'Females')
colnames(g_mongoz) <- c('Freq_L', 'Freq_R')
fisher.test(g_mongoz)
g_lcat <- matrix(c(42, 79, 24, 49), nrow = 2, ncol = 2, byrow = T)
rownames(g_lcat) <- c('Males', 'Females')
colnames(g_lcat) <- c('Freq_L', 'Freq_R')
fisher.test(g_lcat)
table(left_fg$Focal)
table(right_fg$Focal)
fg_all <- matrix(c(16, 25, 19, 24, 32, 61, 10, 28, 40, 37, 5, 23), nrow = 6, ncol = 2, byrow = T)
rownames(fg_all) <- c('LcatM', 'LcatF', 'EmonM', 'EmonF', 'PcoqM', 'PcoqF')
colnames(fg_all) <- c('FreqL', 'FreqR')
G.test(fg_all)
l_locGrasps <-
l_grasps %>%
filter(Category == "L")
left_lg <-
l_locGrasps %>%
filter(Side == "L")
table(left_lg$Focal)
right_lg <-
l_locGrasps %>%
filter(Side == "R")
table(right_lg$Focal)
lg_all <- matrix(c(4, 3, 1, 5, 8, 14, 12, 13, 3, 1, 7, 4), nrow = 6, ncol = 2, byrow = T)
rownames(lg_all) <- c('LcatM', 'LcatF', 'EmonM', 'EmonF', 'PcoqM', 'PcoqF')
colnames(lg_all) <- c('FreqL', 'FreqR')
G.test(lg_all)
l_FoodGrasps <-
l_grasps %>%
filter(Category == "R")
left_fg <-
l_FoodGrasps %>%
filter(Side == "L")
table(left_fg$Focal)
right_fg <-
l_FoodGrasps %>%
filter(Side == "R")
table(right_fg$Focal)
fg_all <- matrix(c(1, 7, 0, 2, 2, 4, 2, 8, 24, 33, 23, 20), nrow = 6, ncol = 2, byrow = T)
rownames(fg_all) <- c('LcatM', 'LcatF', 'EmonM', 'EmonF', 'PcoqM', 'PcoqF')
colnames(fg_all) <- c('FreqL', 'FreqR')
G.test(fg_all)
by_focal <- read.csv("~/Documents/GitHub/Lefty_Lemurs/ByFocal.csv")
ggplot(by_focal, aes(x= Species, y= P.Value, fill = Species)) +
geom_bar(stat= 'identity', color = "black") +
theme_classic()+
xlab("Species of Lemur") +
ylab("P-Value (less than 0.05 is significant)") +
facet_wrap (~ Behavior) +
geom_text(aes(label= P.Value, x= Species, y= P.Value), vjust= -0.6) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 7)) +
labs(caption= "Figure 1: Is Hand Preference Independent of Individual?") +
scale_fill_manual(values = c("#C84E00", "#E89923", "#1D6363"))
by_sex <- read.csv("~/Documents/GitHub/Lefty_Lemurs/BySex.csv")
ggplot(by_sex, aes(x= Species, y= P.Value, fill = Species)) +
geom_bar(stat= 'identity', color = "black") +
theme_classic()+
xlab("Species of Lemur") +
ylab("P-Value (less than 0.05 is significant)") +
geom_text(aes(label= P.Value, x= Species, y= P.Value), vjust= -0.6) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 10)) +
labs(caption= "Figure 2: Is Hand Preference Independent of Sex?") +
scale_fill_manual(values = c("#C84E00", "#E89923", "#1D6363"))
by_species <- read.csv("~/Documents/GitHub/Lefty_Lemurs/BySpecies.csv")
ggplot(by_species, aes(x= Behavior, y= P.Value)) +
geom_bar(stat= 'identity', color = "black", fill = "#DAD0C6") +
theme_classic()+
xlab("Behavior") +
ylab("P-Value (less than 0.05 is significant)") +
geom_text(aes(label= P.Value, x= Behavior, y= P.Value), vjust= -0.5) +
theme(text = element_text(size = 15)) +
theme(axis.text.x = element_text(size = 10)) +
labs(caption= "Figure 3: Is Hand Preference Independent of Species?")
table(left_rg$Species)
table(right_rg$Species)