Skip to content

Commit ea9d364

Browse files
authored
Standardized function names and further typo fixes
1 parent 4f7343a commit ea9d364

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

R/getEMLfunctions.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ get_additional_info <- function(eml_object) {
120120
get_methods <- function(eml_object){
121121
doc <- eml_object$dataset$methods
122122
if(is.null(doc)){
123-
warning("Your EML lacks a methods section. Use set_methods to add methods.")
123+
warning("Your EML lacks a methods section. Use set_methods() to add methods.")
124124
}
125125
return(doc)
126126
}
@@ -174,7 +174,7 @@ get_ds_id <- function(eml_object) {
174174
}
175175
ref_id <- stringr::str_sub(doi, start = -7)
176176
if (suppressWarnings(is.na(as.numeric(ref_id)))) {
177-
warning("Your DOI is not consistent with an NPS DOI. Use set_doi to update your DOI.")
177+
warning("Your DOI is not consistent with an NPS DOI. Use set_doi() to update your DOI.")
178178
ref_id <- NA
179179
}
180180
}
@@ -223,7 +223,7 @@ get_citation <- function(eml_object) {
223223

224224
# piece it together:
225225
if (is.null(doi)) {
226-
warning("No doi specified. Please use set_doi to add a DOI.")
226+
warning("No doi specified. Please use set_doi() to add a DOI.")
227227
}
228228
if (is.null(author_list)) {
229229
warning("No creators detected. Please add at least one \"creator\" in EMLassemlbyline with a valid givenName and surName.")
@@ -440,7 +440,7 @@ get_cui <- function(eml_object) {
440440
cui <- "Does NOT contain CUI"
441441
}
442442
else {
443-
warning("CUI not properly specified. User set_cui to update the CUI code.")
443+
warning("CUI not properly specified. Use set_cui() to update the CUI code.")
444444
cui <- NA
445445
}
446446
return(cui)
@@ -468,7 +468,7 @@ get_file_info <- function(eml_object) {
468468
file_name <- arcticdatautils::eml_get_simple(eml_object, "objectName")
469469

470470
if (is.null(file_name)) {
471-
warning("You have not specified data file names, sizes, or descriptons. If you used EMLassemblyline, double check for any issues generated after running make_eml. Missing data and undefined units will often cause this problem.")
471+
warning("You have not specified data file names, sizes, or descriptions. If you used EMLassemblyline, double check for any issues generated after running make_eml. Missing data and undefined units will often cause this problem.")
472472
print("NA")
473473
} else {
474474
# get file sizes (assumes in bytes)

0 commit comments

Comments
 (0)