Description Usage Arguments Details Value Author(s) References See Also Examples
This function reads a cdb file (or its text version) and creates a data frame with the keys and values.
1 |
file |
The name of the cdb file to read. |
type |
A character string describing the type of file. Value
|
This function reads data files in the cdb format or in its text version. The format is described in the documents of the reference section.
It reads all the keys and values and transforms them as a data frame with two columns.
An object of the class data.frame
with two columns: The first one
collects the keys and the second one shows the values.
Emilio Torres Manzanera
D. J. Bernstein The cdbmake and cdbdump programs http://cr.yp.to/cdb/cdbmake.html
Yusuke Shinyama (2003) Constant Database (cdb) Internals http://www.unixuser.org/~euske/doc/cdbinternals/
Michael Tokarev (2012) TinyCDB - a Constant DataBase http://www.corpit.ru/mjt/tinycdb.html
1 2 3 4 5 6 7 8 9 10 11 12 | packages <- rownames(as.data.frame(installed.packages()))
set.seed(123)
a <- data.frame(key=sample(packages, 10, replace = TRUE),
value=sample(packages, 10, replace = TRUE))
write.cdb(a, "Base.txt", type="txt")
b <- read.cdb("Base.txt", type="txt")
b
c <- read.cdb(system.file("extdata", "example.cdb",
package = "cdb"))
c
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.