DocDataFrame-class: DocDataFrame

DocDataFrame-classR Documentation



The DocDataFrame object wraps a data.frame in a document-oriented interface that is shared with DocList. This is mostly to achieve an abstraction around tabular and list representations of documents. DocDataFrame should behave just like a data.frame, except it adds the accessors described below.


These are some accessors that DocDataFrame adds on top of the basic data frame accessors. Using these accessors allows code to be agnostic to whether the data are stored as a list or data.frame.

  • ndoc(x): Gets the number of documents (rows)

  • nfield(x): Gets the number of fields (columns)

  • ids(x), ids(x) <- value: Gets or sets the document unique identifiers (may be NULL, treated as rownames)

  • fieldNames(x, includeStatic=TRUE, ...): Gets the field (column) names

  • docs(x): Just returns x, as x already represents a set of documents

  • meta(x): Gets an auxillary data.frame of “meta” columns that hold fields that describe, rather than compose, the documents. This feature should be considered unstable. Stay away for now.

  • unmeta(x): Clears the metadata.


Michael Lawrence

See Also

DocList for representing a document collection as a list instead of a table

rsolr documentation built on May 18, 2022, 9:07 a.m.