I uploaded my R package to GitHub and then published it on OpenCPU as explained here.
https://public.opencpu.org/ocpu/github/Klausos9/test/R/test/print
test
is a function that contains squared root estimation formula.
Now, in JFiddle, I am trying to make a simple Call of this function using HTTP API. However, I cannot make it working. Any idea?
http://jsfiddle.net/WVWCR/49/
But when I click the Run button, it says:
R returned an error: unused argument (input = input)
In call:
test(input = input)
Try changing the
ocpu.rpc
call to:The error is coming because your function call passes an argument named
input
while your function is expecting an argument namedx
.EDIT
The full corrected script (for the one mentioned in comments below) :-