Return Values

The result of a REST API for Embedded R Execution function endpoint is a JSON representation of the value returned by the R function of the specified script.

The R function in the script must return a JSON serializable value. The supported values are the following:
  • character
  • numeric
  • integer
  • complex
  • logical
  • lists
  • vectors
  • matrices
  • arrays
  • factors
  • data frame

PNG images rendered in the script are included in the response. In the JSON returned, the IMAGE field contains the bytes of the PNG image and the DATA field contains the return value of the function.