Created
June 19, 2021 11:01
-
-
Save Mytherin/1c0f206eb22ba3256d52356170710217 to your computer and use it in GitHub Desktop.
duckdb R example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("duckdb") | |
library(duckdb) | |
# open a connection to an in-memory database | |
db <- dbConnect(duckdb::duckdb()) | |
# run a SELECT * query that reads from a CSV file at the specified path | |
df <- dbGetQuery(db, 'SELECT * FROM "test/sql/copy/csv/data/real/voter.tsv"') | |
head(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment