Skip to content

Commit

Permalink
Convert arguments with “NULL” string values into real NULL values.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCode404 committed Oct 28, 2024
1 parent c250ae6 commit fabbcbc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/camera/CAMERA_findAdducts.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ cat("\n\n")
print("Arguments retrieved from the command line:")
print(args)

# Function to convert "NULL" strings to actual NULL values
convertNullString <- function(x) {
if (x == "NULL") {
return(NULL)
}
return(x)
}

for (arg in names(args)) {
args[[arg]] <- convertNullString(args[[arg]])
}

print("Argument types:")
print(sapply(args, class))

Expand Down

0 comments on commit fabbcbc

Please sign in to comment.