Troubles Transferring R script to R Custom Script Component

Hi All,

I'm having an issue transferring my R script, which works when running in the R enviornment, into the R Custom Script component.

The error messtaI get is attached in the image below and the Rstdout is also attached.  In addition I attached the original R script, the PP protocol and .csv file I'm working with.

I'm hoping this is just a matter of fixing a fine detail that I'm not aware of as I'm new to R script.

Thanks,

Jeff