Description Usage Arguments Value Author(s) See Also Examples
These functions facilitate the creation of TableSchemaList
objects from
existing or supplementary R data structures such as the data.frame
.
1 2 3 | makeSchemaFromData(tab.df, name=NULL,dta.func=NULL)
makeSchemaFromFunction(dta.func, name,...)
correct.df.names(tab.df)
|
tab.df |
A |
name |
Desired name of the database table |
dta.func |
An optional function which will take a specified object and turn it into a SQLite table. The function parameters should have the same names as the objects supplied to |
... |
Arbitary objects provided to the function specified in |
makeSchemaFromData |
A |
makeSchemaFromData |
A |
correct.df.names |
A |
Daniel Bottomly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if (require(Lahman))
{
franches <- makeSchemaFromData(TeamsFranchises, name="team_franch")
show(franches)
makeSchemaFromFunction(function(x) head(x), name="team_franch", x=TeamsFranchises)
test.df <- TeamsFranchises
names(test.df)[1] <- "franch.ID"
names(test.df)
names(correct.df.names(test.df))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.