rplot.Rd
This function fills the rplot.js glue-partial. The rplot javascript function is part of the OpenCPU javascript library.
rplot(id, rf, json, err = "Error: ")
id | id of the corresponding html elements |
---|---|
rf | name of the R function |
json | inner json of arguments to the R function |
err | error message for the javascript alert |
java script code
appifyr:::rplot("xGkrZCuuI", "rnorm", "n : 5")#> [1] "$(\"#submit-xGkrZCuuI\").click(function(){\r\n var req = $(\"#target-xGkrZCuuI\").rplot(\r\n \"rnorm\",\r\n {n : 5}\r\n );\r\n req.fail(function(){\r\n alert(\"Error: \" + req.responseText);\r\n });\r\n});\r"appifyr:::rplot("xGkrZCuuI", "rnorm", "n : 1000, mean : 100, sd : 15")#> [1] "$(\"#submit-xGkrZCuuI\").click(function(){\r\n var req = $(\"#target-xGkrZCuuI\").rplot(\r\n \"rnorm\",\r\n {n : 1000, mean : 100, sd : 15}\r\n );\r\n req.fail(function(){\r\n alert(\"Error: \" + req.responseText);\r\n });\r\n});\r"