Skip to contents

Print Method for iRODS Data Frame Class.

Usage

# S3 method for irods_df
print(
  x,
  ...,
  digits = NULL,
  quote = FALSE,
  right = TRUE,
  row.names = FALSE,
  max = NULL
)

Arguments

x

An object of class irods_df.

...

optional arguments to print methods.

digits

the minimum number of significant digits to be used: see print.default.

quote

logical, indicating whether or not entries should be printed with surrounding quotes.

right

logical, indicating whether or not strings should be right-aligned. The default is right-alignment.

row.names

logical (or character vector), indicating whether (or what) row names should be printed.

max

numeric or NULL, specifying the maximal number of entries to be printed. By default, when NULL, getOption("max.print") used.

Value

Invisibly return the class irods_df object.

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)

# print (default no row.names)
print(irods_zone)
#> 
#> ========
#> metadata
#> ========
#> /tempZone/home/rods/foo.rds :
#>  attribute value units
#>        foo   bar   baz
#> 
#> 
#> ==========
#> iRODS Zone
#> ==========
#>                 logical_path        type
#>  /tempZone/home/rods/foo.rds data_object

# with row.names
print(irods_zone, row.names = TRUE)
#> 
#> ========
#> metadata
#> ========
#> /tempZone/home/rods/foo.rds :
#>   attribute value units
#> 1       foo   bar   baz
#> 
#> 
#> ==========
#> iRODS Zone
#> ==========
#>                  logical_path        type
#> 1 /tempZone/home/rods/foo.rds data_object

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