CsvFileConn | R Documentation |
CSV File connector class.
CSV File connector class.
This is the abstract connector class for all CSV file databases.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> CsvFileConn
biodb::BiodbConnBase$getBaseUrl()
biodb::BiodbConnBase$getConnClass()
biodb::BiodbConnBase$getConnClassName()
biodb::BiodbConnBase$getDbClass()
biodb::BiodbConnBase$getEntryClass()
biodb::BiodbConnBase$getEntryClassName()
biodb::BiodbConnBase$getEntryContentType()
biodb::BiodbConnBase$getEntryFileExt()
biodb::BiodbConnBase$getEntryIdField()
biodb::BiodbConnBase$getName()
biodb::BiodbConnBase$getPropSlots()
biodb::BiodbConnBase$getPropValSlot()
biodb::BiodbConnBase$getPropertyValue()
biodb::BiodbConnBase$getSchedulerNParam()
biodb::BiodbConnBase$getSchedulerTParam()
biodb::BiodbConnBase$getToken()
biodb::BiodbConnBase$getUrl()
biodb::BiodbConnBase$getUrls()
biodb::BiodbConnBase$getWsUrl()
biodb::BiodbConnBase$getXmlNs()
biodb::BiodbConnBase$hasProp()
biodb::BiodbConnBase$hasPropSlot()
biodb::BiodbConnBase$isSlotProp()
biodb::BiodbConnBase$propExists()
biodb::BiodbConnBase$setBaseUrl()
biodb::BiodbConnBase$setPropValSlot()
biodb::BiodbConnBase$setPropertyValue()
biodb::BiodbConnBase$setSchedulerNParam()
biodb::BiodbConnBase$setSchedulerTParam()
biodb::BiodbConnBase$setToken()
biodb::BiodbConnBase$setUrl()
biodb::BiodbConnBase$setWsUrl()
biodb::BiodbConnBase$updatePropertiesDefinition()
biodb::BiodbConn$addNewEntry()
biodb::BiodbConn$allowEditing()
biodb::BiodbConn$allowWriting()
biodb::BiodbConn$annotateMzValues()
biodb::BiodbConn$checkDb()
biodb::BiodbConn$collapseResultsDataFrame()
biodb::BiodbConn$correctIds()
biodb::BiodbConn$deleteAllCacheEntries()
biodb::BiodbConn$deleteAllEntriesFromPersistentCache()
biodb::BiodbConn$deleteAllEntriesFromVolatileCache()
biodb::BiodbConn$deleteWholePersistentCache()
biodb::BiodbConn$disallowEditing()
biodb::BiodbConn$disallowWriting()
biodb::BiodbConn$download()
biodb::BiodbConn$editingIsAllowed()
biodb::BiodbConn$filterEntriesOnRt()
biodb::BiodbConn$getAllCacheEntries()
biodb::BiodbConn$getAllVolatileCacheEntries()
biodb::BiodbConn$getBiodb()
biodb::BiodbConn$getCacheFile()
biodb::BiodbConn$getCacheId()
biodb::BiodbConn$getChromCol()
biodb::BiodbConn$getDownloadPath()
biodb::BiodbConn$getEntry()
biodb::BiodbConn$getEntryContent()
biodb::BiodbConn$getEntryContentFromDb()
biodb::BiodbConn$getEntryContentRequest()
biodb::BiodbConn$getEntryIds()
biodb::BiodbConn$getEntryImageUrl()
biodb::BiodbConn$getEntryPageUrl()
biodb::BiodbConn$getId()
biodb::BiodbConn$getMatchingMzField()
biodb::BiodbConn$getMzValues()
biodb::BiodbConn$getNbEntries()
biodb::BiodbConn$getNbPeaks()
biodb::BiodbConn$getSearchableFields()
biodb::BiodbConn$isCompounddb()
biodb::BiodbConn$isDownloadable()
biodb::BiodbConn$isDownloaded()
biodb::BiodbConn$isEditable()
biodb::BiodbConn$isExtracted()
biodb::BiodbConn$isMassdb()
biodb::BiodbConn$isRemotedb()
biodb::BiodbConn$isSearchableByField()
biodb::BiodbConn$isWritable()
biodb::BiodbConn$makeRequest()
biodb::BiodbConn$makesRefToEntry()
biodb::BiodbConn$msmsSearch()
biodb::BiodbConn$requiresDownload()
biodb::BiodbConn$searchByName()
biodb::BiodbConn$searchCompound()
biodb::BiodbConn$searchForEntries()
biodb::BiodbConn$searchForMassSpectra()
biodb::BiodbConn$searchMsEntries()
biodb::BiodbConn$searchMsPeaks()
biodb::BiodbConn$searchMzRange()
biodb::BiodbConn$searchMzTol()
biodb::BiodbConn$setDownloadedFile()
biodb::BiodbConn$setEditingAllowed()
biodb::BiodbConn$setMatchingMzField()
biodb::BiodbConn$setWritingAllowed()
biodb::BiodbConn$write()
biodb::BiodbConn$writingIsAllowed()
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
CsvFileConn$new(...)
...
All parameters are passed to the super class initializer.
Nothing.
getCsvQuote()
Gets the characters used to delimit quotes in the CSV database file.
CsvFileConn$getCsvQuote()
The characters used to delimit quotes as a single character value.
setCsvQuote()
Sets the characters used to delimit quotes in the CSV database file.
CsvFileConn$setCsvQuote(quote)
quote
The characters used to delimit quotes as a single character value.
You
may specify several characters. Example \"\\"'\".
Nothing.
getCsvSep()
Gets the current CSV separator used for the database file.
CsvFileConn$getCsvSep()
The CSV separator as a character value.
setCsvSep()
Sets the CSV separator to be used for the database file. If this method is called after the loading of the database, it will throw an error.
CsvFileConn$setCsvSep(sep)
sep
The CSV separator as a character value.
Nothing.
getFieldNames()
Get the list of all biodb fields handled by this database.
CsvFileConn$getFieldNames()
A character vector of the biodb field names.
hasField()
Tests if a field is defined for this database instance.
CsvFileConn$hasField(field)
field
A valid Biodb entry field name.
TRUE of the field is defined, FALSE otherwise.
addField()
Adds a new field to the database. The field must not already exist. The same single value will be set to all entries for this field. A new column will be written in the memory data frame, containing the value given.
CsvFileConn$addField(field, value)
field
A valid Biodb entry field name.
value
The value to set for this field.
Nothing.
getFieldColName()
Get the column name corresponding to a Biodb field.
CsvFileConn$getFieldColName(field)
field
A valid Biodb entry field name. This field must be defined for this database instance.
The column name from the CSV file.
setField()
Sets a field by making a correspondence between a Biodb field and one or more columns of the loaded data frame.
CsvFileConn$setField(field, colname, ignore.if.missing = FALSE)
field
A valid Biodb entry field name. This field must not be already defined for this database instance.
colname
A character vector containing one or more column names from the CSV file.
ignore.if.missing
Deprecated parameter.
Nothing.
getFieldsAndColumnsAssociation()
Gets the association between biodb field names and CSV file column names.
CsvFileConn$getFieldsAndColumnsAssociation()
A list with names being the biodb field names and values being a character vector of column names from the CSV file.
getUnassociatedColumns()
Gets the list of unassociated column names from the CSV file.
CsvFileConn$getUnassociatedColumns()
A character vector containing column names.
print()
Prints a description of this connector.
CsvFileConn$print()
Nothing.
setDb()
Sets the database directly from a data frame. You must not have set the database previously with the URL parameter.
CsvFileConn$setDb(db)
db
A data frame containing your database.
Nothing.
setIgnoreUnassignedColumns()
Tells the connector to ignore or not the columns found in the CSV file for which no assignment were found.
CsvFileConn$setIgnoreUnassignedColumns(ignore)
ignore
Set to TRUE to ignore the unassigned columns, and to FALSE otherwise.
Nothing.
clone()
The objects of this class are cloneable with this method.
CsvFileConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
Super classes BiodbConn
,
and sub-classes CompCsvFileConn
,
MassCsvFileConn
.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector that inherits from CsvFileConn: chebi_file <- system.file("extdata", "chebi_extract.tsv", package="biodb") conn <- mybiodb$getFactory()$createConn('comp.csv.file', url=chebi_file) # Get an entry e <- conn$getEntry('1018') # Terminate instance. mybiodb$terminate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.