## ---- eval = FALSE------------------------------------------------------- # # instead of ellipsis would be specific arguments # method <- function(es, rows = c(), columns = c(), replacea = "mean", ...) { # # Here may be some assertions # # # Data preparation # data <- prepareData(es, rows, columns, replacena) # # # Using method # res <- ... # # # Sending back the result as JSON: # return(jsonlite::toJSON(res)) # # # Or as ProtoBuf # f <- tempfile(pattern = "pat", tmpdir = getwd(), fileext = ".bin") # writeBin(protolite::serialize_pb(res), f) # jsonlite::toJSON(f) # }