-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a script to export the reference database
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
companion_scripts/02_create_database/03_create_reference_database.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.