View source: R/checkVarNames.R
checkVarNames | R Documentation |
SQLite
column name conventions.Checks names for SQLite
column name conventions and
applies appropriate variable name changes to GADSdat
or all_GADSdat
objects.
checkVarNames(GADSdat, checkKeywords = TRUE, checkDots = TRUE)
GADSdat |
|
checkKeywords |
Logical. Should |
checkDots |
Logical. Should occurrences of |
Invalid column names in a SQLite
data base include
SQLite
keywords (see sqlite_keywords
) and
column names with a "."
in it.
The corresponding variable name changes are
appending the suffix "Var"
to all SQLite
keywords and
changing all "."
in variable names to "_"
.
Note that avoiding "."
in variable names is beneficial for multiple reasons, such as
avoiding confusion with S3
methods in R
and issues when importing from Stata
.
Returns the original object with updated variable names.
# Change example data set (create an invalid variable name)
pisa2 <- changeVarNames(pisa, oldNames = "computer_age",
newNames = "computer.age")
pisa3 <- checkVarNames(pisa2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.