Skip to main content

Using an R function with R libraries in Vertica (doParallel, foreach)

  • February 19, 2015
  • 1 reply
  • 12 views

Ryan_De_Vera
Hello all,

I am sorry if this has already been talked about. What I have done is written a function in R that is dependent on the R libraries doParallel and foreach, which allows to define a number of cores on a single machine and run for loops in parallel.

I get the error that one of the functions from the library can not be found.

My question is can I use these libraries in Vertica and utilize it on a single server with 16 cores?

Also if possible could someone please elaborate on the installation process of the libraries just for solidity? I have read a lot of the forums already I just want to be sure I did it correctly.

1 reply

PRana
Forum|alt.badge.img
  • Participating Frequently
  • February 19, 2015
Hi Ryan,

To install libraries in vertica you need to install them in /opt/vertica/bin/R on all the nodes in the cluster. The just load them in your R UDx and use the functions.  Following this process you can use any of R libraries. We haven't used doParallel and foreach specifically, but if you run into problems after proper installation of the libraries, let us know and we'll take a look.

Thanks
Pratibha