| TestRefEntries | R Documentation |
A class for accessing the test reference entries.
A class for accessing the test reference entries.
The test reference entries are stored as JSON files inside
inst/testref folder of each extension package.
new()New instance initializer.
TestRefEntries$new(db.class, pkgName, folder = NULL, bdb = NULL)
db.classIdentifier of the database.
pkgNameName of the package in which are stored the reference entry files.
folderThe folder where to find test reference files for the package. Usually it is "inst/testref".
bdbA valid BiodbMain instance or NULL.
Nothing.
getAllIds()Retrieve all identifiers.
TestRefEntries$getAllIds(limit = 0)
limitThe maximum number of identifiers to return.
A character vector containing the IDs.
getContents()Get the reference contents for the specfied IDs.
TestRefEntries$getContents(ids)
idsThe reference IDs for which to get the contents.
A character vector.
getRealEntries()Retrieve all real entries from database corresponding to the reference entris.
TestRefEntries$getRealEntries(ids = NULL)
idsA character vector of entry identifiers.
A list containing BiodbEntry instances.
saveEntriesAsJson()Saves a list of entries into separate JSON files, inside the test output folder.
TestRefEntries$saveEntriesAsJson(ids, entries)
idsThe IDs of the entries.
entriesA list of entries. It can contain NULL values.
Nothing.
getRealEntry()Retrieves one real entry from database corresponding to one reference entry.
TestRefEntries$getRealEntry(id)
idThe identifier of the entry.
A BiodbEntry instance.
getRefEntry()Retrieves the content of a single reference entry.
TestRefEntries$getRefEntry(id)
idThe identifier of the reference entry to retrieve.
The content of the reference entry as a list.
getAllRefEntriesDf()Load all reference entries.
TestRefEntries$getAllRefEntriesDf()
A data frame containing all the reference entries with their values.
clone()The objects of this class are cloneable with this method.
TestRefEntries$clone(deep = FALSE)
deepWhether to make a deep clone.
# Creates an instance
refEntries <- TestRefEntries$new('comp.sqlite', pkgName='biodb')
# Gets identifiers of all reference entries
refEntries$getAllIds()
# Gets a data frame with the content of the reference entries
refEntries$getAllRefEntriesDf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.