read.list: Read, write and check object of ruList format

View source: R/read.list.R

read.listR Documentation

Read, write and check object of ruList format

Description

The common functions for manipulating objects of structure ruList: reading from file, writing to file of format ruList.txt and checking ruList object for appropriateness.

Usage

read.list(file)

write.list(x, file="")

check.list(x)

Arguments

x

the object of format ruList

file

a character string naming a file

Details

ruList and ruList.txt is the internal dbs-package format for representing complex objects.

The structure of ruList format can be described as three-level nested object: (1) list with any number of elements of 2-d level, (2) list with any number of elements of 3-d level, (3) objects of classes: data.frame, matrix, numeric, character, integer, logical, mod.frame. Any level may have attributes of classes: data.frame, matrix, numeric, character, integer, logical.

The ruList.txt is a human readable representation of ruList object saved to .TXT file.

Value

read.list returns the object of ruList format

check.list returns logical TRUE if the object x has appropriate structure

Note

The current version of check.list does not check attributes of 3-d level.

The current version of write.list does not check x argument for consistency. Be carefull.

See Also

list

Examples

### write, read and check ruList
models<-list(example4_ruSlv)
write.list(models, "models.txt")
models1<-read.list("models.txt")
check.list(models1) # output: TRUE
all.equal(models1, models) # output: 'names for target but not for current'

insysbio/dbs-package documentation built on Aug. 4, 2022, 2:11 p.m.