R Script


This task allows the user to program within the R language. This task requires that the R environment be installed with the RServe library loaded and running.


OPTION DESCRIPTION
R Script The R Code to run.
Load R Script Loads an R script from disk.
Save R Script Saves an R script to disk.

INPUT

No special inputs required, though the R script itself may have dependencies.

OUTPUT

The changes to the Dex input data stream are reflected in the Dex data output stream.

INSTALLATION

  • Install R
  • Run R
  • From the R environment:
    • Install the Rserve library from CRAN:
      • install.packages("Rserve")
    • Start Rserve via:
      • library(Rserve)
      • RServe()

Now you are ready to program R within Dex.

EXAMPLE

Create A Dataset of X, SIN(X), COS(X)

x = seq(0, 360, b = 10)
sin = sin(x*pi/180)
cos = cos(x*pi/180)

data = data.frame(x=x, sin=sin, cos=cos)

results matching ""

    No results matching ""