Blog Archives

R – Analyze any data frame in Saiku

December 4, 2013
By
R – Analyze any data frame in Saiku

In my previous article I have shown how R can be used to analyze PostgreSQL tables in Saiku using dynamically generated OLAP cubes. Today I will show you how you can analyze any R data frame in Saiku. WIth Saiku you can easily create excel-like pivot t...

Read more »

Selecting subset of variables in data frame

July 24, 2013
By

I frequently work with datasets with many variables. In this case I often need to apply some function to subset of variables in data frame. To simplify this task I wrote short function that allows me to specify what variables to include and what variables should be excluded.   I do choose subset of variables based on the following condition types: variable/column...

Read more »

R Credit Scoring – WoE & Information Value in woe Package

July 23, 2013
By
R Credit Scoring – WoE & Information Value in woe Package

In credit scoring, Information Value (IV) is frequently used to compare predictive power among variables. When developing new scorecards using logistic regression, variables are often binned and recoded using WoE concept. Package riv will help you to a...

Read more »

Create R package – Rstudio, github, devtools

July 22, 2013
By

If you are going to create your first package in R, there is common set of tools you will probably use - Rstudio, devtools package and github. You don't have to, but it will save you a lot of time and your code wil be versioned and better understandabl...

Read more »

Create SQL Rules from rpart model

July 19, 2013
By

Mapping output of rpart tree to SQL statements is not easy. In rpart package you have to print out rules and then manually write SQL CASE statement. Fortunately, we can write new function to do this job. To test the function, I will use dataset german...

Read more »

R and PostgreSQL – using RPostgreSQL and sqldf

July 1, 2013
By

PostgreSQL and R can often be used together for data analysis - PostgreSQL as database engine and R as statistical tool. In this article you will learn how to access data stored in PostgreSQL database and how to write the data back using RPostgreSQL an...

Read more »