Skip to content

Commit

Permalink
add utils::
Browse files Browse the repository at this point in the history
  • Loading branch information
zachary-foster committed Feb 4, 2025
1 parent ae6b2fa commit 1287989
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion R/get_boldid.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ get_boldid <- function(sci, fuzzy = FALSE, dataTypes = 'basic',
if (length(boldid) > 1 || NROW(bold_df) > 1) {
# prompt
message("\n\n")
message(paste0(capture.output(bold_df), collapse = "\n"))
message(paste0(utils::capture.output(bold_df), collapse = "\n"))
message("\nMore than one TSN found for taxon '", sci[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n") # prompt
take <- scan(n = 1, quiet = TRUE, what = 'raw')
Expand Down
2 changes: 1 addition & 1 deletion R/get_eolid.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ get_eolid <- function(sci_com, ask = TRUE, messages = TRUE,
message("\n\n")
message("\nMore than one eolid found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = "raw")

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_gbifid.R
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ get_gbifid <- function(sci, ask = TRUE, messages = TRUE, rows = NA,
message("\nMore than one GBIF ID found for taxon '", sci[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
rownames(df) <- 1:nrow(df)
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = 'raw')

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_natservid.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ get_natservid <- function(sci_com, searchtype = "scientific", ask = TRUE,
# prompt
message("\n\n")
rownames(nsdf) <- seq_len(NROW(nsdf))
message(paste0(capture.output(nsdf), collapse = "\n"))
message(paste0(utils::capture.output(nsdf), collapse = "\n"))
message("\nMore than one NatureServe ID found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n") # prompt
take <- scan(n = 1, quiet = TRUE, what = 'raw')
Expand Down
2 changes: 1 addition & 1 deletion R/get_nbnid.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ get_nbnid <- function(sci_com, ask = TRUE, messages = TRUE, rec_only = FALSE,
message("\n\n")
message("\nMore than one NBN ID found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = 'raw')

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_pow.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ get_pow <- function(sci_com, accepted = FALSE, ask = TRUE, messages = TRUE,
if (length(pow) > 1 || NROW(pow_df) > 1) {
# prompt
message("\n\n")
message(paste0(capture.output(pow_df), collapse = "\n"))
message(paste0(utils::capture.output(pow_df), collapse = "\n"))
message("\nMore than one pow found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n") # prompt
take <- scan(n = 1, quiet = TRUE, what = 'raw')
Expand Down
2 changes: 1 addition & 1 deletion R/get_tolid.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ get_tolid <- function(sci, ask = TRUE, messages = TRUE, rows = NA,
message("\nMore than one ToL ID found for taxon '", sci[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
rownames(tol_df) <- 1:nrow(tol_df)
message(paste0(capture.output(tol_df), collapse = "\n"))
message(paste0(utils::capture.output(tol_df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = 'raw')

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_tpsid.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ get_tpsid <- function(sci, ask = TRUE, messages = TRUE, key = NULL,
message("\nMore than one tpsid found for taxon '", sci[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
rownames(df) <- 1:nrow(df)
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = 'raw')

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_tsn.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ get_tsn <- function(sci_com, searchtype = "scientific", accepted = FALSE,

# prompt
message("\n\n")
message(paste0(capture.output(tsn_df), collapse = "\n"))
message(paste0(utils::capture.output(tsn_df), collapse = "\n"))
message("\nMore than one TSN found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
take <- scan(n = 1, quiet = TRUE, what = "raw")
Expand Down
2 changes: 1 addition & 1 deletion R/get_uid.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ get_uid <- function(sci_com, ask = TRUE, messages = TRUE, rows = NA,
message("\n\n")
message("\nMore than one UID found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
take <- scan(n = 1, quiet = TRUE, what = 'raw')

if (length(take) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_wiki.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ get_wiki <- function(sci_com, wiki_site = "species", wiki = "en", ask = TRUE,

# prompt
message("\n\n")
message(paste0(capture.output(df), collapse = "\n"))
message(paste0(utils::capture.output(df), collapse = "\n"))
message("\nMore than one wiki ID found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n")
take <- scan(n = 1, quiet = TRUE, what = 'raw')
Expand Down
2 changes: 1 addition & 1 deletion R/get_wormsid.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ get_wormsid <- function(sci_com, searchtype = "scientific", marine_only = TRUE,

# prompt
message("\n\n")
message(paste0(capture.output(wmdf), collapse = "\n"))
message(paste0(utils::capture.output(wmdf), collapse = "\n"))
message("\nMore than one WORMS ID found for taxon '", sci_com[i], "'!\n
Enter rownumber of taxon (other inputs will return 'NA'):\n") # prompt
take <- scan(n = 1, quiet = TRUE, what = 'raw')
Expand Down
2 changes: 1 addition & 1 deletion R/limited_print.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ limited_print <- function(chars, prefix = "",
} else if (type == "cat") {
cat(output)
} else if (type == "print") {
message(paste0(capture.output(output), collapse = "\n"))
message(paste0(utils::capture.output(output), collapse = "\n"))
} else if (type != "silent") {
stop("invalid type option")
}
Expand Down

0 comments on commit 1287989

Please sign in to comment.