Skip to content

Add support for executing SQL chunks #69

@JakobGM

Description

@JakobGM

Hi!

I have been digging through the documentation in order to understand how to use R.nvim to execute SQL chunks, without success. Is this something you already support or would consider adding support for (I might have missed something here).

My motivation is that I love expressing the initial data transformation in the form of SQL chunks, which are then post-processed in the tidyverse ecosystem before being plotted in ggplot. It looks something like this:

```{r}
library(DBI)
db = dbConnect(RSQLite::SQLite(), dbname = "sql.sqlite")
```

```{sql, output.var="trials", connection=db}
SELECT * FROM trials
```

```{r}
trials %>% as_tibble() %>% ggplot(...) + ...

Thanks in advance!

  • Jakob

PS: Thanks for the great plugin! I used Nvim-R extensively during 2018 and 2019, and I'm happy to return to this ecosystem seeing that things have been keeping up to date with Neovim's migration to lua-based plugins 🙇

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions