| R2SQL_types | R Documentation |
The R2SQL_types() function returns a character vector with the names
of SQLite data types corresponding to the R classes passed through the
x parameter.
If any class is not recognized, it will be replaced with TEXT data type.
R2SQL_types(x)
x |
character, a vector containing the strings with the R class names. |
a character vector with the names of SQLite data types.
# Convert R data types to SQLite types
r_types <- c("character", "integer", "numeric", "logical", "Date")
sql_types <- R2SQL_types(r_types)
# Display the mapping
data.frame(
R_type = r_types,
SQLite_type = sql_types,
row.names = NULL
)
# Handle unknown types (converted to TEXT)
mixed_types <- c("character", "unknown_type", "integer")
R2SQL_types(mixed_types)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.