TYPO: asLogical() takes LGLSXP (was INTSXP)