Skip to content

Commit

Permalink
Go back to original link for bacdvie gspreadsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Dec 13, 2023
1 parent 369e918 commit 5f9413d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
19 changes: 1 addition & 18 deletions R/bacdive.R
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@

# Get BacDive -------------------------------------------------------------

## Helper function for .getBacDive
## This function removes the X columns, which were added because of errors
## in the data. Since the rows filled in those X columns have pontentially
## altered the data in the other fields, those rows will be removed along
## with the X columns.
.cleanBD <- function(df) {
x_cols <- colnames(df)[grep('X', colnames(df))]
output <- vector('list', length(x_cols))
for (i in seq_along(x_cols)) {
output[[i]] <- which(df[[x_cols[i]]] != '')
}
row_numbers <- sort(unique(unlist(output)))
df[-row_numbers, !colnames(df) %in% x_cols]
}

## Helper function for .getBacDive
## This imports the current BacDive data on the spreadsheets
.importBacDiveExcel <- function(verbose = FALSE) {
if (verbose)
message('Importing BacDive...')
# url <- 'https://docs.google.com/spreadsheets/d/1smQTi1IKt4wSGTrGTW25I6u47M5txZkq/export?format=csv'
url <- 'https://docs.google.com/spreadsheets/d/1P4Ic6-N9GVXcX1CdfoamFt6eozfHqt-sxfIRTBvYHWk/export?format=csv'
# bacdive_data <- .cleanBD(utils::read.csv(url))
url <- 'https://docs.google.com/spreadsheets/d/1smQTi1IKt4wSGTrGTW25I6u47M5txZkq/export?format=csv'
bacdive <- utils::read.csv(url)
colnames(bacdive) <- tolower(colnames(bacdive))
return(bacdive)
Expand Down
2 changes: 1 addition & 1 deletion man/fattyAcidComposition.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f9413d

Please sign in to comment.