variable testing in R