SlideShare a Scribd company logo
Informix Through R
Kevin J. Smith
Automation & Development Operations
Introduction
●
Lab Images informix:IIUG2016
●
oninit; startListeners; rstudio
●
Why R
●
Brief Introduction to R
●
Using Informix with R
●
Personal Exploration 2
R Environment
● Installation
– EPEL + yum
– https://www.r-project.org/
● Pre-compiled Binaries
● Source
● Command Line
– > plot(dataset)
– Run Scripts
● source('analyze.R')
● R-Studio
R Basics
● S Language
– High Level
Object-
Oriented
Statistical
Programming
Language
– Everything is
an obejct
● Data Objects
– Scalars: x < - 5
– Vectors: v < - c(2,5,3,2,4)
– Factors: f < - factor(c(“M”,”F”))
– Matrices: m < - matrix(c(2,3,4,5),
nrow=2,ncol=2)
– List: l < - list(5,6,”seven”,m)
– Data Frame: df < -
data.frame(vector=v,matrix=m)
● Working With Data Objects
– v[2] = 5
– v[2:4] = 5, 3, 2
– m[2,1] = 4
– m[[2,2] = 5, 2, 6 (if 2,2 was a
list in a matrix)
– df$vector = 2, 5, 3, 2, 4
– df2 < - cbind(df,l)
– df3 < - rbind(df,f)
R Programming
● Variables and Assignment
– < -
● Arithmetic Operators
– Standard Mathematical
Precedence
– Use () but not [] or {}
– +, -, *, /, ^
R Programming
● Logical Operators
Operator Functionality
& And
| Or
! Not
== Equal to
!= Not equal to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal
to
● Control Structures
R Programming - Subsetting
● Subsetting
– Using logical operators
– Looping not
recommended
– Every logical statement
produces one of the
outcomes TRUE or FALSE
R Programming - Functions
● FunctionName < -
function(arg1, arg2,
… , arg3) { do this }
● Existing functions
come from packages
● Write new Functions
Function Operation Performed
sqrt(x) Square root of x
abs(x) Absolute value
sin(x), tan(x), cos(x) Trigonometric functions
exp(x) Exponential
log(x) Natural logarithm
log10(x) Base 10 logarithm
ceiling(x) Closest integer not less than
x
floor(x) Closest integer not greater
than x
round(x) Closest integer to the
element
Base Package Functions **not limited to
R Database Connectivity
1) Install Driver
2) Setup Driver
3) Install/Indicate R Library
4) In R Obtain Driver (jdbc only)
5) Make Connection with Connection String
R Database Connectivity - Specifics
● JDCB
– Install driver
– library(RJDBC)
– JDBC(package.class,classpat
h,identifier.quote = “””)
– dbConnect(drv,connectionS
tring,user,password)
● ODBC
– Install driver
– Setup driver with driver manager (odbc.ini)
– library(RODBC)
– odbcConnect(dsn)
● Rest
– Start Informix Rest wire-listener
– library(jsonlite)
– fromJson(url)
R Examples
● From the datasets package scripts available to
load into Informix
● Iris_Data_Analysis.pdf
● demo()
Thank You
Comments! or Questions?

More Related Content

PPT
Heaps & Adaptable priority Queues
PPT
Algorithm analysis basics - Seven Functions/Big-Oh/Omega/Theta
PPT
Maps&hash tables
PPT
Queue implementation
PDF
Programming Under Unix and Linux
PPT
jimmy hacking (at) Microsoft
KEY
Linuxconf 2011 parallel languages talk
PPTX
Heaps & Adaptable priority Queues
Algorithm analysis basics - Seven Functions/Big-Oh/Omega/Theta
Maps&hash tables
Queue implementation
Programming Under Unix and Linux
jimmy hacking (at) Microsoft
Linuxconf 2011 parallel languages talk

What's hot (20)

PDF
Java 8 - functional features
PDF
Queues
PDF
openCypher Technology Compatibility Kit (TCK)
PPT
Information security Seminar #3
PDF
Regular expressions, Alex Perry, Google, PyCon2014
PPTX
Detalied information of queue
PPTX
Using Grafana with InfluxDB 2.0 and Flux Lang by Jacob Lisi
PPTX
PDF
Chapter24 operator-overloading
PDF
Vasia Kalavri – Training: Gelly School
PDF
Cilk - An Efficient Multithreaded Runtime System
PDF
Queue
PPT
Review functions
PDF
Flux and InfluxDB 2.0 by Paul Dix
PPTX
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...
PDF
Flink meetup
PPTX
Queue oop
PDF
The Ring programming language version 1.2 book - Part 21 of 84
PDF
Flux and InfluxDB 2.0
PDF
Data recovery using pg_filedump
Java 8 - functional features
Queues
openCypher Technology Compatibility Kit (TCK)
Information security Seminar #3
Regular expressions, Alex Perry, Google, PyCon2014
Detalied information of queue
Using Grafana with InfluxDB 2.0 and Flux Lang by Jacob Lisi
Chapter24 operator-overloading
Vasia Kalavri – Training: Gelly School
Cilk - An Efficient Multithreaded Runtime System
Queue
Review functions
Flux and InfluxDB 2.0 by Paul Dix
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...
Flink meetup
Queue oop
The Ring programming language version 1.2 book - Part 21 of 84
Flux and InfluxDB 2.0
Data recovery using pg_filedump
Ad

Similar to IIUG 2016 Gathering Informix data into R (20)

PPT
Lecture1_R Programming Introduction1.ppt
PPT
R_Language_study_forstudents_R_Material.ppt
PPT
Brief introduction to R Lecturenotes1_R .ppt
PDF
R Programming - part 1.pdf
PPT
Lecture1_R.ppt
PPT
Lecture1 r
PPT
Modeling in R Programming Language for Beginers.ppt
PPT
Lecture1_R.ppt
PPT
introduction to R with example, Data science
PDF
Lecture1_R.pdf
PPTX
MADlib Architecture and Functional Demo on How to Use MADlib/PivotalR
PPTX
Flink internals web
PPT
Slides on introduction to R by ArinBasu MD
PPT
Basics of R-Progranmming with instata.ppt
PPT
17641.ppt
PPT
17641.ppt
PDF
R basics
PPT
Best corporate-r-programming-training-in-mumbai
PPT
Introduction to R for Data Science Technology
PPT
How to obtain and install R.ppt
Lecture1_R Programming Introduction1.ppt
R_Language_study_forstudents_R_Material.ppt
Brief introduction to R Lecturenotes1_R .ppt
R Programming - part 1.pdf
Lecture1_R.ppt
Lecture1 r
Modeling in R Programming Language for Beginers.ppt
Lecture1_R.ppt
introduction to R with example, Data science
Lecture1_R.pdf
MADlib Architecture and Functional Demo on How to Use MADlib/PivotalR
Flink internals web
Slides on introduction to R by ArinBasu MD
Basics of R-Progranmming with instata.ppt
17641.ppt
17641.ppt
R basics
Best corporate-r-programming-training-in-mumbai
Introduction to R for Data Science Technology
How to obtain and install R.ppt
Ad

Recently uploaded (20)

PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
climate analysis of Dhaka ,Banglades.pptx
PDF
annual-report-2024-2025 original latest.
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PDF
Fluorescence-microscope_Botany_detailed content
PDF
Lecture1 pattern recognition............
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PDF
Mega Projects Data Mega Projects Data
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
Miokarditis (Inflamasi pada Otot Jantung)
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
ISS -ESG Data flows What is ESG and HowHow
Data_Analytics_and_PowerBI_Presentation.pptx
climate analysis of Dhaka ,Banglades.pptx
annual-report-2024-2025 original latest.
Acceptance and paychological effects of mandatory extra coach I classes.pptx
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Business Ppt On Nestle.pptx huunnnhhgfvu
Fluorescence-microscope_Botany_detailed content
Lecture1 pattern recognition............
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Qualitative Qantitative and Mixed Methods.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Mega Projects Data Mega Projects Data
IBA_Chapter_11_Slides_Final_Accessible.pptx

IIUG 2016 Gathering Informix data into R

  • 1. Informix Through R Kevin J. Smith Automation & Development Operations
  • 2. Introduction ● Lab Images informix:IIUG2016 ● oninit; startListeners; rstudio ● Why R ● Brief Introduction to R ● Using Informix with R ● Personal Exploration 2
  • 3. R Environment ● Installation – EPEL + yum – https://www.r-project.org/ ● Pre-compiled Binaries ● Source ● Command Line – > plot(dataset) – Run Scripts ● source('analyze.R') ● R-Studio
  • 4. R Basics ● S Language – High Level Object- Oriented Statistical Programming Language – Everything is an obejct ● Data Objects – Scalars: x < - 5 – Vectors: v < - c(2,5,3,2,4) – Factors: f < - factor(c(“M”,”F”)) – Matrices: m < - matrix(c(2,3,4,5), nrow=2,ncol=2) – List: l < - list(5,6,”seven”,m) – Data Frame: df < - data.frame(vector=v,matrix=m) ● Working With Data Objects – v[2] = 5 – v[2:4] = 5, 3, 2 – m[2,1] = 4 – m[[2,2] = 5, 2, 6 (if 2,2 was a list in a matrix) – df$vector = 2, 5, 3, 2, 4 – df2 < - cbind(df,l) – df3 < - rbind(df,f)
  • 5. R Programming ● Variables and Assignment – < - ● Arithmetic Operators – Standard Mathematical Precedence – Use () but not [] or {} – +, -, *, /, ^
  • 6. R Programming ● Logical Operators Operator Functionality & And | Or ! Not == Equal to != Not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to ● Control Structures
  • 7. R Programming - Subsetting ● Subsetting – Using logical operators – Looping not recommended – Every logical statement produces one of the outcomes TRUE or FALSE
  • 8. R Programming - Functions ● FunctionName < - function(arg1, arg2, … , arg3) { do this } ● Existing functions come from packages ● Write new Functions Function Operation Performed sqrt(x) Square root of x abs(x) Absolute value sin(x), tan(x), cos(x) Trigonometric functions exp(x) Exponential log(x) Natural logarithm log10(x) Base 10 logarithm ceiling(x) Closest integer not less than x floor(x) Closest integer not greater than x round(x) Closest integer to the element Base Package Functions **not limited to
  • 9. R Database Connectivity 1) Install Driver 2) Setup Driver 3) Install/Indicate R Library 4) In R Obtain Driver (jdbc only) 5) Make Connection with Connection String
  • 10. R Database Connectivity - Specifics ● JDCB – Install driver – library(RJDBC) – JDBC(package.class,classpat h,identifier.quote = “””) – dbConnect(drv,connectionS tring,user,password) ● ODBC – Install driver – Setup driver with driver manager (odbc.ini) – library(RODBC) – odbcConnect(dsn) ● Rest – Start Informix Rest wire-listener – library(jsonlite) – fromJson(url)
  • 11. R Examples ● From the datasets package scripts available to load into Informix ● Iris_Data_Analysis.pdf ● demo()