dbDataType,PrestoDriver-method | R Documentation |
object
Return the corresponding presto data type for the given R object
## S4 method for signature 'PrestoDriver'
dbDataType(dbObj, obj, ...)
dbObj |
A PrestoDriver object |
obj |
Any R object |
... |
Extra optional parameters, not currently used |
The default value for unknown classes is ‘VARCHAR’.
A character
value corresponding to the Presto type for
obj
drv <- RPresto::Presto()
dbDataType(drv, 1)
dbDataType(drv, NULL)
dbDataType(drv, as.POSIXct("2015-03-01 00:00:00", tz = "UTC"))
dbDataType(drv, Sys.time())
dbDataType(
drv,
list(
c("a" = 1L, "b" = 2L),
c("a" = 3L, "b" = 4L)
)
)
dbDataType(
drv,
list(
c(as.Date("2015-03-01"), as.Date("2015-03-02")),
c(as.Date("2016-03-01"), as.Date("2016-03-02"))
)
)
dbDataType(drv, iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.