Skip to content

Commit

Permalink
add a script to export the reference database
Browse files Browse the repository at this point in the history
  • Loading branch information
haganjam committed Aug 10, 2023
1 parent 5f2b23f commit ce42ddf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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")
Binary file added database/reference_database.rds
Binary file not shown.

0 comments on commit ce42ddf

Please sign in to comment.