fixed logic in checking validity of data for classic mode
added envir argument to rhsave
fresh run of roxygen