Installing R packages in Vertica

Moderator: NorbertKrupa

Post Reply
Posts: 1
Joined: Thu Jan 17, 2013 12:09 am

Installing R packages in Vertica

Post by evan.kodra » Thu Jan 17, 2013 12:16 am

So I've been trying to install an R package dtw so that it will work within a query. So far with no luck. Basically I scp'd the package into the directory where the R libraries are kept, which happens to be called /opt/vertica/R/lib64/R/library. So now it's sitting in there with other libraries that do work (and came with the initial installation of R), but it doesn't work.

Now when I run my query (which wraps my R function I made around the query, as in SELECT timeSeriesClustering(blah) from Blah, etc) I get the following error:

ERROR 3399: Failure in UDx RPC call InvokeProcessPartition(): Error calling processPartition() in User Defined Object [timeSeriesClusteringFactory] at [RInterface.cpp:1006], error code: 0, message: Exception in processPartitionForR: ‘dtw’ is not a valid installed package

So question: it seems to be recognizing the package but it's not installed in a 'valid way'? Does anyone know how to install packages in Vertica in such a way that this will work?

By the way, inside my R function, it crashes at library(dtw).

User avatar
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am

Re: Installing R packages in Vertica

Post by JimKnicely » Thu Jan 17, 2013 2:56 pm


I have a friend who was having similar issues with Vertica R. He discovered that Vertica R would not work if an R package had already been installed from the repository (i.e. you've installed R via something like rpm -ivh ... noarch.rpm). He had to uninstall the repository R package and then install Vertica's R package and it worked!

PS - This is a suggestion! But it did work for him. Good luck and keep us posted!
Jim Knicely


Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “R Language Integration”