@@ -77,7 +77,7 @@ entity = function(
77
77
if (! check ) {
78
78
msg = c(
79
79
msg ,
80
- paste0(' Entity "' ,object $ name ,
80
+ paste0(' "' ,object $ name ,
81
81
' " is not valid because ' ,
82
82
eval(k $ msg ,env = list2env(slots(object )))
83
83
)
@@ -211,7 +211,7 @@ slots=function(object){
211
211
212
212
# function to expand inherits to vectors/lists
213
213
elements_inherit = function (x , class_name ) {
214
- sapply(x , function (el ) inherits(el , class_name ))
214
+ sapply(x , function (el ) inherits(el , class_name , which = TRUE ))
215
215
}
216
216
217
217
# check that all elements of a vector inherit one of the classes in 'type' INCLUDES LISTS
@@ -221,7 +221,7 @@ vector_type_equals = entity_constraint(
221
221
222
222
# check that the value is of the correct type
223
223
type_equals = entity_constraint(
224
- ex = inherits(value ,type ) | (' ANY' %in% type ),
224
+ ex = inherits(value ,type , which = TRUE ) | (' ANY' %in% type ),
225
225
msg = paste0(' "value" must be ' , paste0(' "' ,type ,' "' ,collapse = ' or ' ),' .' )
226
226
)
227
227
0 commit comments