Tag Archive for 'R'

Try blocks in R for error handling

R scripts halt execution when an error is encountered.  When batch processing this produces situations where the error can not be merely skipped like it could in a .net application with  user involvement. To use Try() blocks for error handling in R, enclose the entire block of code in a try() block.

# Do some stuff here
png(filename=args[3], width=900, height=300)
# some more code here...

Data science work station

As of October 2017, these installations on Cent OS 7 create a functional data science workstation.

  1. yum install epel-release
  2. yum install ImageMagick
  3. yum install python-pip
  4. yum install python-devel
  5. yum install tkinter
  6. yum groupinstall “Development Tools”
  7. yum install R
  8. pip install –user parsedatetime
  9. pip install –user matplotlib
  10. pip install –user cython
  11. pip install –user scipy
  12. pip install –user xlsxwriter
  13. pip install –user pystan
  14. pip install –user fbprophet
  15. from R prompt of the user who uses R: install.packages(‘prophet’)