We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceac3f9 commit 44f405dCopy full SHA for 44f405d
R/ccdrAlgorithm-main.R
@@ -110,6 +110,15 @@ ccdr.run <- function(data,
110
data_matrix <- data$data
111
ivn_list <- data$ivn
112
113
+ ### If ivn_list contains character names, convert to indices
114
+ if("character" %in% list_classes(ivn_list)){
115
+ ivn_list <- lapply(ivn_list, function(x){
116
+ idx <- match(x, names(data_matrix))
117
+ if(length(idx) == 0) NULL # return NULL if no match (=> observational)
118
+ else idx
119
+ })
120
+ }
121
+
122
### Call the CCDr algorithm
123
ccdr_call(data = data_matrix,
124
ivn = ivn_list,
0 commit comments