Skip to contents

This function loads an R object from a file into the global environment or a new environment.

Usage

load_obj(file)

Arguments

file

character A character string specifying the file path.

Value

The loaded R object.

Examples

# Load an R object from a file
obj <- load_obj("path/to/file.RData")
#> Warning: cannot open compressed file 'path/to/file.RData', probable reason 'No such file or directory'
#> Error in readChar(con, 5L, useBytes = TRUE): cannot open the connection