This document describes the use of the functions implemented in DescriptiveStats.OBeu package in OpenCPU environment, after installing OpenCPU and DescriptiveStats.OBeu package on OpenCPU server address(/ocpu/test).
Go to: yourserver/ocpu/test
Type to the endpoint:
../library/ {name of the library} /R/ {function}
If you want to see the function parameters you should:
Get
To run a function you should:
Post
Then you can click on Ajax Request.
In this example we will use ds.analysis
function that returns in a single call a json string or a list with the following components:
+---------------+------------------------+-----------------------------------------------------------+
| Component | Output | Description |
+===============+========================+===========================================================+
| statistics
| - Min | - The minimum observed value of the input data |
| | - Max | - The maximum observed value of the input data |
| | - Range | - The difference between maximum and minimum |
| | - Mean | - The average value of the input data |
| | - Median | - The median value of the input data |
| | - Quantiles | - The 25%, 75% percentiles |
| | - Variance | - The variance of the input data |
| | - StandardDeviation | - The standard deviation of the input data |
| | - Skewness | - The Skewness of the input data |
| | - Kurtosis | - The Kurtosis of the input data |
+---------------+------------------------+-----------------------------------------------------------+
| boxplot
| - lo.whisker | - Lower horizontal line out of the box |
| | - lo.hinge | - Lower horizontal line of the box |
| | - median | - Horizontal line in the box |
| | - up.hinge | - Upper horizontal line of the box |
| | - up.whisker | - Upper horizontal line out of the box |
| | - box.width | - The box width of each variable |
| | - lo.out | - Lower outliers |
| | - up.out | - Upper outliers |
| | - n | - The number of non-NA observations |
+---------------+------------------------+-----------------------------------------------------------+
| histogram
| - cuts | - The boundaries of the histogram classes |
| | - counts | - The frequency of each histogram class |
| | - mean | - The average value of the input vector |
| | - median | - The median value of the input data |
+---------------+------------------------+-----------------------------------------------------------+
| frequencies
| - Variable name | - The name of the calculated variable |
| | - frequencies | - The frequency value |
| | - "_row" | - Name of the categories of the variable |
| | - relative.frequencies | - Relative frequency values |
+---------------+------------------------+-----------------------------------------------------------+
| correlation
| - Variable name | - The name of the calculated variable |
| | - Correlation value | - The correlation value |
| | - "_row" | - The corresponding correlation variable |
+---------------+------------------------+-----------------------------------------------------------+
Table: ds.analysis
components
Go to: yourserver/ocpu/test
Copy and paste the following function to the endpoint
../library/DescriptiveStats.OBeu/R/ds.analysis # library/ {name of the library} /R/ {function}
Post
Click add parameters every time you want to add a new parameters and values.
Define the input data:
data
Wuppertal_df
Define the outliers parameter(optional):
outliers
FALSE
Define the fr.select parameter(optional):
fr.select
"Produktbereich"
You add likewise further parameters and change the default parameters of c.out
, box.width
, hist.class
, corr.method
, see DesciptiveStats.OBeu reference manual for further details.
copy the /ocpu/tmp/{this_id_number}/R/.val (second on the right panel)
finally, paste yourserver/ocpu/tmp/{this_id_number}/R/.val
on a new tab.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.