Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Commit

Permalink
Updated some figures
Browse files Browse the repository at this point in the history
Fixed up the import and wrangling of Greenwood data to allow comparisons over time (again). TODO: fix the effects plots
  • Loading branch information
flakesw committed Mar 6, 2019
1 parent 3a6ddb2 commit fee0058
Show file tree
Hide file tree
Showing 49 changed files with 2,166 additions and 295 deletions.
4 changes: 4 additions & 0 deletions .Rproj.user/EAEB7255/console06/98DD95A6
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Microsoft Windows [Version 6.1.7601][?25l
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Sam\Documents\Research\MS Thesis\Understory>[?25h
2 changes: 1 addition & 1 deletion .Rproj.user/EAEB7255/console06/INDEX001
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[{"allow_restart":true,"alt_buffer":false,"autoclose":1,"buffered_output":"","caption":"Terminal 1","channel_id":"7526","channel_mode":1,"child_procs":false,"cols":93,"cwd":"","exit_code":15,"handle":"98DD95A6","interaction_mode":2,"max_output_lines":1000,"restarted":false,"rows":48,"shell_type":3,"show_on_output":false,"terminal_sequence":1,"title":"","track_env":false,"zombie":false}]
2 changes: 1 addition & 1 deletion .Rproj.user/EAEB7255/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab" : 0
"activeTab" : -1
}
2 changes: 1 addition & 1 deletion .Rproj.user/EAEB7255/pcs/windowlayoutstate.pper
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"left" : {
"panelheight" : 779,
"splitterpos" : 326,
"topwindowstate" : "NORMAL",
"topwindowstate" : "HIDE",
"windowheight" : 817
},
"right" : {
Expand Down
29 changes: 0 additions & 29 deletions .Rproj.user/EAEB7255/sources/per/t/679490EB

This file was deleted.

29 changes: 0 additions & 29 deletions .Rproj.user/EAEB7255/sources/per/t/6DD0CFE5

This file was deleted.

29 changes: 0 additions & 29 deletions .Rproj.user/EAEB7255/sources/per/t/7EBDE282

This file was deleted.

23 changes: 0 additions & 23 deletions .Rproj.user/EAEB7255/sources/per/t/EE7BA85C

This file was deleted.

4 changes: 4 additions & 0 deletions .Rproj.user/EAEB7255/sources/prop/25B4B1DC
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"cursorPosition" : "36,29",
"scrollLine" : "27"
}
4 changes: 2 additions & 2 deletions .Rproj.user/EAEB7255/sources/prop/2A13C8B0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"cursorPosition" : "180,52",
"scrollLine" : "162"
"cursorPosition" : "298,47",
"scrollLine" : "286"
}
2 changes: 2 additions & 0 deletions .Rproj.user/EAEB7255/sources/prop/2C2B9CE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
4 changes: 4 additions & 0 deletions .Rproj.user/EAEB7255/sources/prop/5E4621F
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"cursorPosition" : "36,29",
"scrollLine" : "27"
}
4 changes: 4 additions & 0 deletions .Rproj.user/EAEB7255/sources/prop/8DF0DCEC
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"cursorPosition" : "13,21",
"scrollLine" : "4"
}
4 changes: 2 additions & 2 deletions .Rproj.user/EAEB7255/sources/prop/A1FFFDE6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"cursorPosition" : "94,50",
"scrollLine" : "20"
"cursorPosition" : "23,28",
"scrollLine" : "17"
}
4 changes: 2 additions & 2 deletions .Rproj.user/EAEB7255/sources/prop/D455C530
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cursorPosition" : "6,18",
"scrollLine" : "0",
"cursorPosition" : "359,2",
"scrollLine" : "348",
"tempName" : "Untitled1"
}
3 changes: 3 additions & 0 deletions .Rproj.user/EAEB7255/sources/prop/INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ C%3A%2FUsers%2FSam%2FGoogle%20Drive%2FThesis%20related%2FUnderstory%2Funderstory
C%3A%2FUsers%2FSam%2FGoogle%20Drive%2FThesis%20related%2FUnderstory%2Funderstory_effects_plots.R="5FD4B92F"
C%3A%2FUsers%2FSam%2FGoogle%20Drive%2FThesis%20related%2FUnderstory%2Funderstory_electivity.R="16C87132"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Fplot_level_understory.R="2A13C8B0"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Fplot_level_understory_082418.R="25B4B1DC"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Fplot_level_understory_090618.R="B04D5E6E"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Fplot_level_understory_112817.R="5E4621F"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Funderstory_data_prep.R="A1FFFDE6"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Funderstory_effects_plots.R="8DF0DCEC"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Funderstory_electivity.R="D455C530"
~%2FResearch%2FMS%20Thesis%2FUnderstory%2Funderstory_electivity010819.R="8CD3B36B"
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ plots_to_use <- unique(ms$Plot)[plots_to_use_dead & plots_to_use_live]
#------------------------------------------------------------------------------
#perform analysis for the four FTs
types <- c("All", "Perennial grass", "Cheatgrass", "Perennial forb", "Shrub")

ntypes <- length(types)
#initialize a list of dataframes to catch the electivities at each plot/FT
elect_results <- list()
for(i in 1:5){
for(i in 1:ntypes){
elect_results[[i]] <- data.frame(Plot = numeric(0),
Dead = numeric(0),
Live = numeric(0),
Expand Down Expand Up @@ -206,7 +206,7 @@ nit <- 999 #number of monte carlo draws

#initialize a list of dataframes to catch the electivities at each plot/FT
elect_means <- list()
for(i in 1:5){
for(i in 1:ntypes){
elect_means[[i]] <- data.frame(Iter = numeric(0),
Dead = numeric(0),
Live = numeric(0),
Expand Down Expand Up @@ -279,7 +279,7 @@ for(type in types){


results_boots <- list()
for(i in 1:5){
for(i in 1:ntypes){
results_boots[[i]] <- data.frame(Dead = numeric(2),
Live = numeric(2),
Inter = numeric(2),
Expand All @@ -291,7 +291,7 @@ for(i in 1:5){
names(results_boots) <- types

#calculate p-values from distribution of bootstrapped mean electivities
for(i in 1:5){
for(i in 1:ntypes){
emp_mean <- apply(elect_results[[i]][, 2:7], 2, FUN = function(x){mean(x, na.rm = TRUE)})

pvals <- c(sum(elect_means[[i]][2] > emp_mean[1]),
Expand Down Expand Up @@ -327,7 +327,7 @@ par(mfrow = c(3,2),
mar = c(2,1,1,2),
oma = c(2,3,1,0))

for(i in 1:5){
for(i in 1:ntypes){

melt_elect <- melt(elect_results[[i]][, 2:4])
plot(melt_elect$value ~ I(as.numeric(melt_elect$variable)+ runif(nrow(melt_elect), -.1, .1 )),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"collab_server" : "",
"contents" : "",
"created" : 1547060059118.000,
"created" : 1547225685816.000,
"dirty" : false,
"encoding" : "UTF-8",
"folds" : "",
"hash" : "482206355",
"id" : "BBCED885",
"lastKnownWriteTime" : 1547087115,
"last_content_update" : 1547087115203,
"hash" : "1518548566",
"id" : "9E5C163F",
"lastKnownWriteTime" : 1551912261,
"last_content_update" : 1551912261877,
"path" : "~/Research/MS Thesis/Understory/plot_level_understory.R",
"project_path" : "plot_level_understory.R",
"properties" : {
"cursorPosition" : "180,52",
"scrollLine" : "162"
"cursorPosition" : "298,47",
"scrollLine" : "286"
},
"relative_order" : 8,
"relative_order" : 1,
"source_on_save" : false,
"source_window" : "",
"type" : "r_source"
Expand Down
Loading

0 comments on commit fee0058

Please sign in to comment.