Coder Social home page Coder Social logo

eitsupi / duckdb-r Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duckdb/duckdb-r

1.0 1.0 0.0 11.61 MB

The duckdb R package

Home Page: https://duckdb.org/docs/api/r.html

License: Other

Shell 0.20% C++ 30.33% Python 1.90% R 66.07% Makefile 1.38% CMake 0.13%

duckdb-r's Introduction

duckdb R package

Installation from CRAN

install.packages("duckdb")

Installation from r-universe

install.packages("duckdb", repos = c("https://duckdb.r-universe.dev", "https://cloud.r-project.org"))

Installation from GitHub

# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
pak::pak("duckdb/duckdb-r")

User Guide

See the R API in the DuckDB documentation.

Building

To build the bleeding edge of duckdb-r, you can clone this repository and run

~duckdb-r: R CMD INSTALL .

If you wish to test new duckdb functionality with duckdb-r, make sure your clones of duckdb-r and duckdb share the same parent directory. Then run the following commands

~ (cd duckdb && git checkout {{desired_branch}})
~ (cd ducdkb-r && ./vendor.sh)
~ (cd duckdb-r && R CMD INSTALL .)

It helps if both the duckdb directory and duckdb-r directory are clean. If you encounter linker errors, merge both duckdb-r and duckdb with their respective main branches.

Dependencies

To build the R package, you first need to install the dependencies:

# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
pak::pak()

Developing with Extensions

If you wish to build or add extensions to the R package you first need to build duckdb with the extension_static_build flag. The following commands allow you to add the httpfs extension to a DuckDB R build. See the extension ReadMe for more information about extensions

cd duckdb/
EXTENSION_STATIC_BUILD=1 make

Then in R, run:

library(duckdb)
con <- DBI::dbConnect(duckdb(config=list('allow_unsigned_extensions'='true')))
dbExecute(con, "LOAD '{{path_to_duckdb}}/build/release/extension/httpfs/httpfs.duckdb_extension'")

For more information about using extensions, see the documentation on extensions. For instructions on building them, see extension README.

duckdb-r's People

Contributors

hannes avatar jangorecki avatar krlmlr avatar m-muecke avatar mytherin avatar szarnyasg avatar tmonster avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.