List fields available in database table
sqliteListFields(table, file, ...)
table | Name of the table to inspect |
---|---|
file | Path to the SQLite database file |
... | Other parameters passed on to methods. |
A character vector of field names.
# Setup ---- library(RSQLite) database_file <- tempfile() conn <- dbConnect(SQLite(), dbname = database_file) dbWriteTable(conn, "mtcars", mtcars[1:5, ]) dbWriteTable(conn, "USArrests", USArrests[1:5, ]) dbDisconnect(conn) # Example ---- sqliteListFields("mtcars", database_file)#> [1] "mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" #> [11] "carb"