You're going to find it really hard to get help without a reproducible example that contains executable R code: