zis: Manipulate .zis files (ZooImage Samples description)

zisR Documentation

Manipulate .zis files (ZooImage Samples description)

Description

Additional data concerning the samples are collected together in .zis files. These functions manipulate such .zis files.

Usage

zisCreate(zisfile, template = NULL, edit = TRUE, editor =
    getOption("fileEditor"), wait = FALSE)
zisEdit(zisfile, editor = getOption("fileEditor"), wait = FALSE, ...)
zisRead(zisfile = "Description.zis", expected.sections =
    c("Description", "Series", "Cruises", "Stations", "Samples"))

Arguments

zisfile

the name of the .zis file to manipulate (usually, "Description.zis").

template

a .zis template to start with, if the .zis file does not exist yet.

edit

do we edit the .zis file after its creation?

editor

the program to use to edit the .zis file.

wait

do we wait that edition of file is done?

expected.sections

list of the sections that must be present in the .zis file.

...

further arguments to pass to fileEdit().

Value

zisRead() returns a 'ZIDesc' object containing all the data in the .zis file, or, in case of fealure (detailed in a warning), it returns NULL. The two other functions return TRUE or FALSE invisibly, depending if the .zis file could be created/edited or not.

Author(s)

Philippe Grosjean <Philippe.Grosjean@umons.ac.be>

See Also

zidCompress, fileEdit

Examples

## Read content of the example zis file
zisFile <- system.file("examples", "Description.zis", package = "zooimage")
zisData <- zisRead(zisFile)
zisData  # These are data for samples
attr(zisData, "metadata")  # Further data (for the series) here

## Create a new .zis file in tempdir using the example .zis file as template
zisNew <- file.path(tempdir(), "Description.zis")
zisCreate(zisNew, template = zisFile, edit = FALSE)  # One can edit it here too

## Edit the new file, and wait edition is completed
zisEdit(zisNew, wait = TRUE)
## It contains:
if (interactive()) file.show(zisNew, title = basename(zisNew), delete.file = TRUE)

## Clean up
rm(zisFile, zisData, zisNew)

SciViews/zooimage documentation built on March 4, 2023, 4:03 a.m.