sanchitchip / AdapteR

Advanced analytics package that enables R users to perform in-database analytics using Fuzzy Logix's flagship DB Lytix suite of functions on Teradata

Home Page:http://www.fuzzylogix.com/products/adapter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AdapteR README

Fuzzy Logix’s new R package AdapteR enables the R syntax to consume DB Lytix™ in-database analytics by generating SQL transparently, and replacing R matrix and data frame data structures with remote table objects.

What is AdapteR?

With Fuzzy Logix’ DB Lytix™, advanced analytics can realize dramatic improvements in performance by moving computation from client machines into data warehouses and clusters where big data lives. As important as performance and scalability is the way in which the end user interacts with the analytics, and the R language has become most pervasive in this area. R is remarkably expressive and flexible, allowing for fast prototyping and evaluation, enabling agile analytics. Fuzzy Logix’s new R package AdapteR enables the R syntax to consume DB Lytix™ in-database analytics by generating SQL transparently, and replacing R matrix and data frame data structures with remote table objects. AdapteR uses R’s class system and method override to seamlessly leverage in-database analytics, without requiring complicated R server installations or writing custom SQL. AdapteR can be used to build interactive analytics at scale with just a few lines of R code!

You can download the full manual here: AdapteR package manual.

Requirements

AdapteR needs DB Lytix™ suite to be installed on your Teradata Appliance, so it can use its fast C++ implementation of analytical functions. Find more information on http://www.fuzzylogix.com.

R

Installation of R on Windows:

  1. Download and install R(>=3.2.0) from https://cran.r-project.org/bin/windows/base/

Installation of R on Linux:

  1. Install R using Ubuntu:
    apt-get install r-base
        
  2. Install OS packages required to build R packages

    Ubuntu:

    apt-get -y build-dep libcurl4-gnutls-dev
    apt-get -y install libcurl4-gnutls-dev
    apt-get install libssl-dev
        

Work environments & recommendations

We recommend to

Installation and Update instructions

  1. Open R-Studio or an R terminal
  2. The recommended way to install (or update) the package is through github and the convenience function install_github function in the devtools package:
    1. Install devtools package using “install.packages(“devtools”)”
      install.packages("devtools") ## Required for install_github
              
    2. Load devtools using
      require(devtools)
              
    3. Install AdapteR from github
      install_github("Fuzzy-Logix/AdapteR")
              

      This automatically installs dependencies.

  3. Load AdapteR using
    library(AdapteR)
        

Remove older Version, if you encounter any issues

remove.packages("AdapteR")

Connecting to the Data Warehouse

AdapteR does not depend on either JDBC or ODBC but uses either you provide at runtime. You can either use ODBC or JDBC to connect to the warehouse, see instructions below.

Use flConnect to connect to a database. Help on this can be found using

?flConnect

ODBC

install.packages("RODBC") ## Required for ODBC Connection.Need to setup odbc Source
library(RODBC)

JDBC

Java JDK

RJDBC

In order to use jdbc with AdapteR, you need to install rJava

install.packages("rJava") ## Required for RJDBC
install.packages("RJDBC") ## Required for JDBC connection
library(RJDBC)            ## check if RJDBC can be loaded

JDBC connectors

Also, you need to download and use the jdbc connector jar files either in the java load path or provide them when calling flConnect the java development toolkit (jdbc).

AdapteR Demos and Training

The package includes some demos to get you started and to explain the most important concepts:

require(AdapteR)
demo(package="AdapteR")
## run a demo:
## demo("matrix.correlation",package="AdapteR")
Demos in package ‘AdapteR’:

connecting              
matrix.algebra          
matrix.correlation

Optional packages

The following suggested packages provide functions that are used if AdapteR functions are called on data.frame, matrix or vectors (not remote representations). Functions in these packages provide the reference implementations for
install.packages("psych")
install.packages("SDMTools")
install.packages("MASS")
install.packages("psych")
install.packages("cluster")
install.packages("survival")
install.packages("mgcv")
install.packages("moments")
install.packages("stringdist")

These packages are required to run the test suite:

install.packages("testthat")
install.packages("optparse")

About

Advanced analytics package that enables R users to perform in-database analytics using Fuzzy Logix's flagship DB Lytix suite of functions on Teradata

http://www.fuzzylogix.com/products/adapter/


Languages

Language:R 100.0%