Calls a server function as defined in the server's call to the
slServer function.
Result object that might have a plot
property (giving a string that would work as the src
attribute of an img element, representing graphics
drawn by the command), a data property (giving
the value returned by the command) and a headers
property (giving the column names in the data returned if any). If the promise resolves to an error, the argument to the error function is a string representing the cause of the error.
string The name of the R function to call.
object An object whose keys are the arguments
to the function being called.
string, HTMLElement If provided, the
<img> element (or id of the element) that will receive the
plot output (if any). The plot returned will be the size that this
element already has, so ensure that it is styled in a way that it has
the correct size even if no image (or an old image) has been set.
object [optional] An object whose keys can be:
"imgType": Type of image required, "png"
(default) or "svg"; "info": Function to be called
if the R function sendInfoText is called;
"progress": Function to be called if the R function
sendProgress is called.