@@ -77,7 +77,7 @@ entity = function(
7777 if (! check ) {
7878 msg = c(
7979 msg ,
80- paste0(' Entity "' ,object $ name ,
80+ paste0(' "' ,object $ name ,
8181 ' " is not valid because ' ,
8282 eval(k $ msg ,env = list2env(slots(object )))
8383 )
@@ -211,7 +211,7 @@ slots=function(object){
211211
212212# function to expand inherits to vectors/lists
213213elements_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 ))
215215}
216216
217217# 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(
221221
222222# check that the value is of the correct type
223223type_equals = entity_constraint(
224- ex = inherits(value ,type ) | (' ANY' %in% type ),
224+ ex = inherits(value ,type , which = TRUE ) | (' ANY' %in% type ),
225225 msg = paste0(' "value" must be ' , paste0(' "' ,type ,' "' ,collapse = ' or ' ),' .' )
226226)
227227
0 commit comments