Skip to contents

Converts a list of class idaifield_docs, idaifield_resource or idaifield_simple into a matrix. Recommended to use with idaifield_simple-lists as returned by simplify_idaifield(). If given a list of class idaifield_docs containing all meta-info, it will automatically unnest to resource level. It is recommended to select the list first using idf_select_by() from this package to reduce the amount of columns returned. See example.

Usage

idaifield_as_matrix(idaifield)

Arguments

idaifield

An object as returned by get_idaifield_docs(), check_and_unnest() or simplify_idaifield()

Value

a matrix (depending on selection and project database it can be very large)

Examples

if (FALSE) {
connection <- connect_idaifield(serverip = "127.0.0.1",
                                user = "R",
                                pwd = "hallo")
idaifield_docs <- get_idaifield_docs(connection = connection,
                                     projectname = "rtest")
pottery <- select_by(idaifield_docs, by = "category", value = "Pottery")
pottery <- simplify_idaifield(pottery,
                              uidlist = get_uid_list(idaifield_docs))
pottery <- idaifield_as_matrix(pottery)
}