Description Usage Arguments Value Author(s) See Also Examples
MeSHDb
is the simple class for providing the relationship between Entrez gene IDs and MeSH IDs. It provides the database connection and easily accessible with columns
, keytypes
, keys
and select
. Some users may use additional functions such as dbconn
, dbfile
, dbschema
, dbInfo
, and species
for much complex data acquisition.
columns
shows which kinds of data can be returned for the
MeSHDb
object.
keytypes
allows the user to discover which keytypes can be
passed in to select
or keys
and the keytype
argument.
keys
returns keys for the database contained in the
MeSHDb
object . This method is already documented in the keys manual page but is mentioned again here because it's usage with
select
is so intimate. By default it will return the primary
keys for the database, but if used with the keytype
argument,
it will return the keys from that keytype.
select
will retrieve the data as a data.frame based on
parameters for selected keys
, columns
, and keytype
arguments.
dbconn
returns the connection with database in the package.
dbfile
returns the absolute path sqlite file is saved.
dbschema
returns the database schema.
dbInfo
returns the many meta information about the package.
species
returns the species name.
1 2 3 4 5 6 7 8 9 |
x |
the |
object |
same as x |
keys |
the keys to select records for from the database. All possible keys are returned by using the |
columns |
the columns or kinds of things that can be retrieved from the database. As with |
keytype |
the keytype that matches the keys used. For the
|
... |
other arguments. |
file |
The |
show.indices |
The CREATE INDEX statements are not shown by default. Use |
keys
, columns
, keytypes
, dbfile
, dbInfo
, and species
each return a character vector or possible values. select
and dbschema
each return a data.frame. dbconn
returns database connection.
Koki Tsuyuzaki
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # # load a package that creates an MeSHDb object
# library(MeSH.Mmu.eg.db)
# MeSH.Mmu.eg.db
# ## then the methods can be used on this object.
# cls <- columns(MeSH.Mmu.eg.db)
# cls
# kts <- keytypes(MeSH.Mmu.eg.db)
# kt <- kts[2]
# kts
# ks <- head(keys(MeSH.Mmu.eg.db, keytype=kts[2]))
# ks
# res <- select(MeSH.Mmu.eg.db, keys=ks, columns=cls, keytype=kt)
# head(res)
# dbconn(MeSH.Mmu.eg.db)
# dbfile(MeSH.Mmu.eg.db)
# dbschema(MeSH.Mmu.eg.db)
# dbInfo(MeSH.Mmu.eg.db)
# species(MeSH.Mmu.eg.db)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.