inst/opencpu/ocpu-getdata.R

# Jeroen Ooms
#
# HTTPS+ProtoBuf RPC POC using OpenCPU
# Script below downloads MASS::Animals using protobuf
library(RProtoBuf)
library(httr)

req <- GET ('https://public.opencpu.org/ocpu/library/MASS/data/Animals/pb')
output <- unserialize_pb(req$content)
identical(output, MASS::Animals)

Try the RProtoBuf package in your browser

Any scripts or data that you put into this service are public.

RProtoBuf documentation built on Nov. 3, 2022, 9:06 a.m.