How to run DataSailr

Overview

DataSailr embeds internal data processing engine called libsailr. DataSailr maps each record of R dataframe onto libsailr's data structure, and passes Sailr scipt to libsailr. Libsailr executes Sailr scipt, process the data passed, and return the result for each record. DataSailr receives results for each record, and returns them as dataframe to R user.

DataSailr Overview

datasailr::sail() processes dataframe

The sail() function takes two arguments. The 1st argument is the dataframe to be processed. The 2nd argument is the Sailr script that the internal libsailr engine follows.

library(datasailr)
script = '
  \<sailr_script\>
'
result = datasailr::sail(df, script)

With the use magrittr's pipe operator (%>%),

library(datasailr)
library(magrittr)
script = '
  \<sailr_script\>
'
result = df %>% datasailr::sail( script )

More about Sailr script

Quick tutorial to Sailr script is described here.

Grammar of Sailr script is described here.