From 38b1cc6d1f0904f5004b5cf587f4bead80cb0a7f Mon Sep 17 00:00:00 2001 From: harrietatherton5 <161741004+harrietatherton5@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:25:09 +0000 Subject: [PATCH 1/2] Update finelitterfall_teaching.r Changed the default name --- fine_litter_fall/finelitterfall_teaching.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fine_litter_fall/finelitterfall_teaching.r b/fine_litter_fall/finelitterfall_teaching.r index a3a5f1f..7d963c4 100644 --- a/fine_litter_fall/finelitterfall_teaching.r +++ b/fine_litter_fall/finelitterfall_teaching.r @@ -163,7 +163,7 @@ if(max(All_npp$DaysBetween,na.rm = TRUE)>60){ -write.csv(All_npp, file=paste0(data_flf$plot_code[1], "_fine_litter_fall_NPP_finest.csv")) +write.xlsx(All_npp, file=paste0(data_flf$plot_code[1], "_FLFNPP.xlsx")) #There is no standard error because it is the finest resolution. We recommend to calculate standard error with From 84a6e48c48af1de9ceb8d8d10d26e53870e271ef Mon Sep 17 00:00:00 2001 From: harrietatherton5 <161741004+harrietatherton5@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:54:36 +0000 Subject: [PATCH 2/2] Update finelitterfall_teaching.r Changed default name --- fine_litter_fall/finelitterfall_teaching.r | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fine_litter_fall/finelitterfall_teaching.r b/fine_litter_fall/finelitterfall_teaching.r index 7d963c4..797171a 100644 --- a/fine_litter_fall/finelitterfall_teaching.r +++ b/fine_litter_fall/finelitterfall_teaching.r @@ -50,14 +50,14 @@ library(tools) library(lubridate) # Set your working directory (the file where your data, code and functions.r are located ) # Be careful to use / and not \ -setwd("F:/Side_project/african_data_workshop/gem_code_examples/fine_litter_fall/") +setwd("/Users/harrietatherton/Documents/Malhi_RA/GitHub/gem_code_examples/fine_litter_fall") # Load pre prepared functions source("functions_flf_v2.r") # Load your data. # Since we are in the right directory, we can just write the name of the dataset -data_flf_name<-'flf_20190201_XXX.csv' +data_flf_name<-'/Users/harrietatherton/Documents/Malhi_RA/GitHub/gem_code_examples/fine_litter_fall/flf_20190201_XXX(example).csv' # Use the right separator for your data, depends on how you saved the .csv file (comma separator or ; separator) data_flf <- read.csv(data_flf_name) %>% @@ -161,8 +161,8 @@ colnames(All_npp)<-str_replace_all(old_col_name,'_g_per_trap','_MgC_ha_month') if(max(All_npp$DaysBetween,na.rm = TRUE)>60){ warnings("Check your time interval, there are very large value")} - - +##Installing xlsx package to write.xlsx +library("openxlsx") write.xlsx(All_npp, file=paste0(data_flf$plot_code[1], "_FLFNPP.xlsx")) #There is no standard error because it is the finest resolution. We recommend to calculate standard error with