initExtension

0th

Percentile

Add useful extension functions

These extension functions are written by Liam Healy and made available through the SQLite website (http://www.sqlite.org/contrib).

Usage
initExtension(db)
Arguments
db

A '>SQLiteConnection object to load these extensions into.

Available extension functions

Math functions

acos, acosh, asin, asinh, atan, atan2, atanh, atn2, ceil, cos, cosh, cot, coth, degrees, difference, exp, floor, log, log10, pi, power, radians, sign, sin, sinh, sqrt, square, tan, tanh

String functions

charindex, leftstr, ltrim, padc, padl, padr, proper, replace, replicate, reverse, rightstr, rtrim, strfilter, trim

Aggregate functions

stdev, variance, mode, median, lower_quartile, upper_quartile

Aliases
  • initExtension
Examples
# NOT RUN {
library(DBI)
db <- RSQLite::datasetsDb()
RSQLite::initExtension(db)

dbGetQuery(db, "SELECT stdev(mpg) FROM mtcars")
sd(mtcars$mpg)
dbDisconnect(db)
# }
Documentation reproduced from package RSQLite, version 2.0, License: LGPL (>= 2)

Community examples

Looks like there are no examples yet.