This document describes the use of the functions implemented in Cluster.OBeu package in OpenCPU environment, after installing OpenCPU and Cluster.OBeu package on your 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 cl.analysis
function that returns in a single call a json string or a list with the following components:
| Component | Description | | :------------: | :--------------------------------: | | cluster.method | Label of the clustering algorithm | | raw.data | Input data | | data.pca | Principal components | | modelparam | Clustering model specifications | | compare | Clustering measures |
Table: cl.analysis
components
Go to: yourserver/ocpu/test
Copy and paste the following function to the endpoint
../library/Cluster.OBeu/R/cl.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:
cl.data
sample_city_data
Define the cluster algorithm parameter:
cl.meth
pam
Define the cluster number parameter:
clust.numb
3
For larger datasets you can specify likewise a specific clustering feature (cl_feature), the amounts and the aggregation if needed by defining cl_feature, amount, cl.aggregate parameters, see Cluster.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.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.