Skip to contents

Coerce iRODS Zone information class to data.frame().

Usage

# S3 method for irods_df
as.data.frame(x, ...)

Arguments

x

irods_df class object.

...

Currently not implemented

Value

Returns a data.frame. Note, that the columns of metadata consists of a list of data frames, and status_information and permission_information consist of data frames.

Examples

is_irods_demo_running()
#> [1] TRUE

# demonstration server (requires Bash, Docker and Docker-compose)
# use_irods_demo()

# connect project to server
create_irods("http://localhost/irods-rest/0.9.3", "/tempZone/home")

# authenticate
iauth("rods", "rods")

# some data
foo <- data.frame(x = c(1, 8, 9), y = c("x", "y", "z"))

# store data in iRODS
isaveRDS(foo, "foo.rds")

# add some metadata
imeta(
  "foo.rds",
  "data_object",
  operations =
    data.frame(operation = "add", attribute = "foo", value = "bar",
      units = "baz")
)

# iRODS Zone with metadata
irods_zone <- ils(metadata = TRUE)

# check class
class(irods_zone)
#> [1] "irods_df"

# coerce into `data.frame` and extract metadata of "foo.rds"
irods_zone <- as.data.frame(irods_zone)
irods_zone[basename(irods_zone$logical_path) == "foo.rds", "metadata"]
#> [[1]]
#>   attribute value units
#> 1       foo   bar   baz
#> 

# delete object
irm("foo.rds", force = TRUE)