Skip to content

Commit bc3bf9e

Browse files
committed
New warning for unintended space
1 parent 1b874b6 commit bc3bf9e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

R/add_qsimVis_id.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ add_qsimVis_id <- function(
3434
){
3535
separate_project_ids <- strsplit(x = translation_table$model_IDs, ",")
3636
project_ids <- unlist(separate_project_ids)
37+
too_much_space <- grepl(pattern = "^ | $", x = project_ids)
38+
if(any(too_much_space)){
39+
warning("There are project ID's beginning or ending with a space,",
40+
"possibily unintended: ",
41+
"'", paste0(project_ids[too_much_space], collapse = "', '"), "'")
42+
}
3743

3844
aggregated_data$qsimVis_source <- aggregated_data$qsimVis_ID <- NA
3945

0 commit comments

Comments
 (0)