Here you will find daily news and tutorials about R, contributed by over 573 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

(This article was first published on CloudStat, and kindly contributed to R-bloggers)

In this video tutorial, it will show you how to make R analysis Modules just like MS Excel Templates using the Building Derivative Calculator app as study case.

Let’s say we wanted to know the derivative of tan(x^2 + 3), commonly, we will use the code below to get the result.

copy the entire code, paste into R GUI again and run to get the result.

What if we can build a R-based statistical module so that our analysis can be reused just like the Excel template?

So, here is a very simple tool to achieve this goal. We just click the “Build” button. We can see our original code. Let’s make some modification.

Substitute the expression, sinh( x^3 – 6 ) into [—||functionx||—] as below

e <- expression( [—||functionx||—] ) dydx <- D(e, “x”) dydx

At the application area (for designing your user interface), we just copy and paste the [—||functionx||—] there. Then click “Publish” button. The app is gone live immediately!

We just try the newly built R apps by inserting the different expression and execute to get the derivatives. We can make it nicer by hiding the original code.

Hope you will find helpful with this R templates/modules!

In this video tutorial, it will show you how to make R analysis Modules just like MS Excel Templates using the Building Derivative Calculator app as study case.

Related

To leave a comment for the author, please follow the link and comment on his blog: CloudStat.