encodeObject: Serialize R object

View source: R/encode_object.R

encodeObjectR Documentation

Serialize R object

Description

This function serializes a given R object and creates a character string containing the binary of the object. This object can be send to the DataSHIELD servers.

Usage

encodeObject(obj, obj_name = NULL, check_serialization = TRUE)

Arguments

obj

(arbitrary R object) Object which should be send to DataSHIELD.

obj_name

('character(1L)') Name of the object (default is 'NULL'). If name is set to 'NULL', then the object name passed to the function is used.

check_serialization

('logical(1L)') Check if the serialized model can be deserialized locally (default is 'TRUE').

Value

Character of length 1 containing the serialized object as string.

Author(s)

Daniel S.

Examples

mod = lm(Sepal.Width ~ ., data = iris)
bin = encodeObject(mod)
substr(bin, 1, 50)

difuture-lmu/dsROCGLM documentation built on March 24, 2024, 1:07 p.m.