Tag archive for: R

How to save and load environment objects in R

There was a need for me to build a prediction model in R and a Shiny app to allow users to get predictions out of my model. As the building of a prediction model take quite a while, it is not feasible for my shiny app to build the prediction model on demand.

There must be a way for my Shiny app to load my prediction model only once for fulfilling prediction requests from the users. As with many other programming languages, there are mechanisms in R that allow me to save my environment objects in one session and load them back in another session. This post documents how I can save and load environment objects in R.

How to use the aggregate function in R to perform computation on measures that are categorized by some variables in a data frame

In today’s fast-paced world, there are tremendous amount of data being recorded periodically. These data may come from sensors which record some measurement along with some categorization such as time and sensor type.

To make sense of such data, most data analysts use the R programming language as a tool. Apart from being free, there are many nice features of R which can help make my data analysis work easier.

This post records the use of the aggregate function in R which I often use to create meaning out of the humongous data which I lay my hands on.