From ce42ddff2fa7451da2b2f4d57eaa130150f70007 Mon Sep 17 00:00:00 2001 From: James Hagan Date: Thu, 10 Aug 2023 16:14:48 +0200 Subject: [PATCH] add a script to export the reference database --- .../03_create_reference_database.R | 23 ++++++++++++++++++ database/reference_database.rds | Bin 0 -> 2248 bytes 2 files changed, 23 insertions(+) create mode 100644 companion_scripts/02_create_database/03_create_reference_database.R create mode 100644 database/reference_database.rds diff --git a/companion_scripts/02_create_database/03_create_reference_database.R b/companion_scripts/02_create_database/03_create_reference_database.R new file mode 100644 index 0000000..c139d23 --- /dev/null +++ b/companion_scripts/02_create_database/03_create_reference_database.R @@ -0,0 +1,23 @@ +#' @title reference list +#' @description create a data.frame of the equation references +#' @details This script compiles the list of publications from which the +#' equations in the equation database were compiled +#' @author James G. Hagan (james_hagan(at)outlook.com) +#' + +# load relevant libraries +library(dplyr) +library(readxl) + +# load the reference list +ref_dat <- readxl::read_xlsx(path = "C:/Users/james/OneDrive/PhD_Gothenburg/Chapter_4_FreshInvTraitR/data/allometry_database_ver4/reference_database.xlsx") +head(ref_dat) + +# check the database +View(ref_dat) + +# replace the NA characters with true NAs +ref_dat[ref_dat == "NA"] <- NA + +# export the database as a .rds file +saveRDS(ref_dat, "database/reference_database.rds") diff --git a/database/reference_database.rds b/database/reference_database.rds new file mode 100644 index 0000000000000000000000000000000000000000..6a583ebb0649382889fe57378d12703d5161377a GIT binary patch literal 2248 zcmV;(2sig1iwFP!000002DMn-avQf5W@0;*(l|SHA3}XWENi)i2No=|l9YFVH?g+Yh?{xuTTRou-;0 z4}k^FIXLG#-@)qhw_B~&rPk#)FSRaR!Ozx}r$_g_0p`Ak!3I9>;&c7hKU&q_?Ut1r zR=#KD`&RzY$`7n0R{qq=kF5OI%1tYOZsnGhZ7TyS!oqB9evD2DTN#VI^)HZiskdW?3fC9;&fg4jAyAET;7%ZbZLZ&mC20*rg5sJ+N(Ry z*$GSCA+GE)am-w1ZojHSc>C4B%DYxRT9aR{$->H)Yx0j)+Q`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