ddply strips jags_sample class from object - fixed by setting class in subfunction