The example produces an error, > hicp <- get_data(key, filter) Error in !is.na(obsAttrs.df) && ifelse(is.na(any(obsAttrs.df == "NULL")), : 'length = 2' in coercion to 'logical(1)'