In reply to Philip.

If you want help with R code, post your question to an R discussion list.