Server Offloading
RIGHT supports server offloading using Shiny package. For example, when RIGHT users want to make a regression, the client side just send nodes information to the server side. After the server side do complicated calculation on R, it sends only result back to the client side. From this server offloading, even though the client side which has no R environment could do complex calculation quickly.
Details
The RIGHT package depends on the Shiny packages, so we have to install this first, e.g. in R via:
> install.packages('Shiny')
To run shiny type :
> library(shiny)
> setwd("YOUR PATH")
> runApp("YOUR FOLDER NAME")
Now, type the code you want to run :
> RIGHT(
YOUR CODE
)
UNDER CONSTRUCTION
Example
Typing this code in R> library("shiny", lib.loc="C:/Program Files/R/R-3.1.1/library")
> subDiamonds <- diamonds[sample(1:nrow(diamonds), 100, T) ,]
> RIGHT({ loessArray1 <- runServer({obj <- loess(carat ~ price, data = subDiamonds)
xRange <- range(subDiamonds$price)
simArray <- data.frame(price = seq(xRange[1], xRange[2], length.out = 132))
simArray$carat <- predict(obj, newdata = simArray)
return(simArray)})
lmArray1 <- runServer({obj <- lm(carat ~ price, data = subDiamonds)
xRange <- range(subDiamonds$price)
simArray <- data.frame(price = seq(xRange[1], xRange[2], length.out = 132))
simArray$carat <- predict(obj, newdata = simArray)
return(simArray)})
plot(carat~price, subDiamonds, type="p")
lines(carat~price, loessArray1)
lines(carat~price, lmArray1)})
so, I recommend linking the result in new page(Not this page)Click Here!!