Learn R Programming

PivotalR

PivotalR is a package that enables users of R, the most popular open source statistical programming language and environment, to interact with Greenplum Database and the PostgreSQL for big data analytics. It does so by providing an interface to the operations on tables/views in the database. These operations are almost the same as those of data.frame. Minimal amount of data is transfered between R and the database. Thus the users of R do not need to learn SQL when they operate on the objects in the database. PivotalR also lets the user to run the functions of the open source machine learning package Apache MADlib directly from R.

  1. An Introduction to PivotalR

     vignette("pivotalr") # execute in R console to view the PDF file
  2. To install PivotalR:

    • Get the latest stable version from CRAN by running install.packages("PivotalR")

    • Or try out the latest development version from github by running the following code (need R >= 3.0.2):

      ## install.packages("devtools") # 'devtools' package is only available for R >= 3.0.2
      devtools::install_github("PivotalR", "greenplum-db")
    • Or download the source tarball directly from here, and then install the tarball

      install.packages("greenplum-db-PivotalR-xxxx.tar.gz", repos = NULL, type = "source")

    where "greenplum-db-PivotalR-xxxx.tar.gz" is the name of the package that you have downloaded.

  3. To get started:

Copy Link

Version

Install

install.packages('PivotalR')

Monthly Downloads

261

Version

0.1.18.5

License

GPL (>= 2)

Maintainer

Last Published

March 12th, 2021

Functions in PivotalR (0.1.18.5)

by

Apply a Function to a db.data.frame Split by column(s)
as.environment

Evaluate expressions within the context of a database table or view
AIC

AIC methods for Madlib regression objects
Arith-methods

arraydb.to.arrayr

Convert strings extracted from database into arrays
as.factor-methods

Convert one column of a '>db.obj object into a categorical variable
as.db.data.frame

Convert other objects into a db.data.frame object
Aggregate functions

Functions to perform a calculation on multiple values and return a single value
array.len

Get the length of the array in an array column
abalone

Abalone data set
coef

Extract model coefficients for Madlib regression objects
content

Print the content of a db.obj object
Extract database connection info

Utilities for extracting related information about a database connection
Compare-methods

db.Rcrossprod-class

Class "db.Rcrossprod"
db.data.frame

Create a db.data.frame object pointing to a table/view in the database
db.data.frame-class

Class "db.data.frame"
crossprod

Compute the matrix product of X^T and Y.
db.list

List all the currently active connections with their information
conn.eql

Check whether two connections are the same
db.objects

List all the existing tables/views in a database with their schema names
db.obj-class

Abstract Class "db.obj"
db.q

Execute a SQL query
conn.id

Find out the connection ID of a db.obj object
cbind2-methods

Combine two db.obj Objects by Columns
db.Rquery-class

Class "db.Rquery" and its sub-class db.Rview-class
clean.madlib.temp

Delete all the result tables created during calculations of MADlib
generic.cv

Generic cross-validation for supervised learning algorithms
dim-methods

Dimension of a table
eql-methods

Test if two objects point to the same table
generic.bagging

This function runs boostrap aggregating for a given training function.
db.connect

Create a connection to a database
Func-methods

Mathematical functions that take '>db.obj objects as the argument
Extract-Replace-methods

db.search.path

Display or set the search path (i.e. default schemas) for a connected session to a database. The use can easily switch to a schema that he has the privilege to write.
db.table-class

Class "db.table"
delete

Safely delete a db.obj object or a table/view in the database
db.existsObject

Test whether an object exists in the database
db.view-class

Class "db.view"
db.disconnect

Disconnect a connection to a database
ifelse

Conditional Element Selection
is.db.data.frame

Check if an object is of type db.data.frame
is.na-method

Query if the entries in a table are NULL
is.factor-methods

Detect whether a '>db.obj object is a categorical object
key

Get or set the primary key for a table
Logical-methods

Logical operations for '>db.obj objects
madlib.elnet

MADlib's elastic net regularization for generalized linear models
madlib.arima

Wrapper for MADlib's ARIMA model fitting function
getTree.rf.madlib

MADlib wrapper function for Random Forest
groups

Summary information for Logistic Regression output
madlib.lm

Linear regression with grouping support, heteroskedasticity
madlib.randomForest

MADlib wrapper function for Random Forest
madlib.rpart

MADlib wrapper function for Decision Tree
madlib.lda

Wrapper for MADlib's Latent Dirichilet Allocation
margins

Compute the marginal effects of regression models
madlib.glm

Generalized Linear Regression by MADlib in databases
madlib.kmeans

Wrapper for MADlib's Kmeans clustering function
plot.dt.madlib

Plot the result of madlib.rpart
madlib.svm

Support Vector Machine with regression and novelty detection
madlib.summary

Data summary function
predict

Generate the db.Rquery object that can calculate the predictions
PivotalR-package

An R font-end to PostgreSQL and Greenplum database, and wrapper for in-database parallel and distributed machine learning open-source library MADlib
GUI

Graphical interface for PivotalR based upon shiny
predict.dt.madlib

Compute the predictions of the model produced by madlib.rpart
predict.elnet.madlib

Predict using the regression result of elastic net regularization
predict.arima

Forecast from MADlib's ARIMA fits
print.elnet.madlib

Display the results from madlib.elnet function in a pretty format
predict.bagging.model

print.lm.madlib

Display results of linear regression
print.none.obj

Function used in GUI to print absolutely nothing
merge-method

Computing a join on two tables
print

Display results of logistic regression
null.data

A Data Set with lots of NA values
names-methods

The Names of an object
residuals

Residuals methods for Madlib regression objects
na.action

Functions for filtering NA values in data
print.arima.madlib

Display results of ARIMA fitting of madlib.arima
Row_actions

Compute the sum or mean of all columns in one row of a table
print.dt.madlib

Print the result of madlib.rpart
print.rf.madlib

Print the result of madlib.randomForest
summary.lm.madlib

Summary information for Linear Regression output
unique-methods

The Unique of an object
print.summary.madlib

Display the results from summary function in a pretty format
predict.lda

Prediction function for MADlib's LDA models
perplexity.lda

Perplexity of LDA predictions
summary.arima.madlib

Summary information for MADlib's ARIMA model
predict.rf.madlib

Compute the predictions of the model produced by madlib.randomForest
sample-methods

Methods for sampling rows of data from a table/view randomly
scale

Scaling and centering of tables
preview

Read the actual data stored in a table of database.
vcov

vcov methods for Madlib regression objects
sort

Sort a table or view by a set of columns
text.dt.madlib

Add labels onto the figure generated by plot.dt.madlib
Type Cast functions

Cast columns of db.obj objects to other types
subset-methods

Extract a subset of a table or view
print-methods

Display the connection information associated with a db object
summary.elnet.madlib

Summary information for Elastic net regularization output
summary

Summary information for Logistic Regression output