aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-05 18:41:45 +0200
committerRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-05 18:41:45 +0200
commit1b58327278038a1111a88c521e6992c15e0b17ea (patch)
tree8efca42ba93dbb1c214e45b38b44e5a669375ee7 /R
parent533570776daf567afa543fdfb19db2c8aa4616f8 (diff)
Set identifiers to NA if not initialized, add NEWS
Diffstat (limited to 'R')
-rw-r--r--R/chent.R15
1 files changed, 15 insertions, 0 deletions
diff --git a/R/chent.R b/R/chent.R
index 60c42c4..6f77582 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -138,6 +138,21 @@ chent <- R6Class("chent",
if (chyaml) {
self$get_chyaml()
}
+
+ # Define main identifiers as NA if still not available
+ if (is.null(self$smiles)) {
+ self$smiles <- NA
+ attr(self$smiles, "source") <- "user"
+ }
+ if (is.null(self$inchikey)) {
+ self$inchikey<- NA
+ attr(self$inchikey, "source") <- "user"
+ }
+ if (is.null(self$mw)) {
+ self$mw<- NA
+ attr(self$mw, "source") <- "user"
+ }
+
invisible(self)
},

Contact - Imprint