1) Using Numeric Functions to create a Horizontal Abstraction.

This Blog entry is from the Loading, Shaping and Merging Data section in Learn R.

As introduced R has a plethora of Blog entries that facilitate the creation of Vectors and Matrices, furthermore there are base numeric operators which facilitate:

·         + Addition.

·         - Subtraction.

·         * Multiplication.

·         / Division.

·         %% Exponent.

·         ^ Power Of.

Functions also provide the ability to perform mathematical operations.  In this example, a vector of double values will be created then rounded.  Create a new script and start by creating a vector containing double values:

Double <- c(1.22341,5.889988,6.9999890)

Run the line of script to console:


Use the round() function,  which takes two arguments of value and digits, to round the Double vector to two decimal places assigning that vector:


Run the line of script to console:


Write out the DoubleRound vector by typing:


Run the line of script to console:


It can be observed that the vector has been rounded to two decimal places.  By way of further abstraction find the square root:


Run the line of script to console:


A more concise way to create a line of script relying on several functions, could include nesting the functions:

DoubleNested <- sqrt(round(Double,2))


Run the line of script to console:


It can be observed that with the help of several R numeric functions that complex horizontal abstractions can take place.

Introduction to Loading and Shaping

This Blog entry is from the Loading, Shaping and Merging Data section in Learn R.

Abstraction, the process of shaping and molding raw data to enhance relevance prior to it being presented to machine learning algorithms, is the cornerstone of the methodologies put forward in these Blog entries.

The Blog entries that follow set out the means to load data into R, and when this data resides in R, sets forth procedures to shape and mold the data in as part of abstraction.

Most generally in Jube procedures and methodology Abstraction is offloaded to Relational Database Management platforms, the shaping and molding of data in R tends to be to augment these core datasets.