MyNixOS website logo
Description

AI-Driven Code Generation, Explanation and Execution for Data Analysis.

Employing artificial intelligence to convert data analysis questions into executable code, explanations, and algorithms. The self-correction feature ensures the generated code is optimized for performance and accuracy. 'mergen' features a user-friendly chat interface, enabling users to interact with the AI agent and extract valuable insights from their data effortlessly.

mergen

Overview

mergen employs artificial intelligence to convert data analysis questions into executable code, explanations, and algorithms. The self-correction feature ensures the generated code is optimized for performance and accuracy. mergen features a user-friendly chat interface, enabling users to interact with the AI agent and extract valuable insights from their data effortlessly.

The package website with full documentation is here.

If you want to use mergen in your Rstudio session via an embedded chatbot, try out our companion package mergenstudio.

Installation

The easiest way to install mergen is via install.packages

install.packages("mergen")

Development version

To get a bug fix or to use a feature from the development version, you can install the development version of mergen from GitHub.

# install.packages("pak")
pak::pak("BIMSBbioinfo/mergen")

Prerequisites

  • Make an AI platform account. Choices are openai.com, neets.ai (at the time of writing free with some limits), replicate.com , perplexity.ai etc. In addition, you can locally run an LLM in server mode and you can interact with it via API. One example is GPT4all. Some of these solutions are not tested but should work with mergen.
  • Create an OpenAI API key to use with the package
  • Create a replicate API key
  • Set up the API key in R

Configuring your AI API key

To interact with an AI API, you require a valid AI API key. To configure your key so that it is present globally in your environment at all times, you can include it in your .Renviron file. This will ensure that the key is automatically loaded.

For setting up mergen, this variable should be called AI_API_KEY. For more information on setting up an agent, we recommend you visit Get Started .

Caution: If you’re using version control systems like GitHub, include .Renviron in your .gitignore file to prevent exposing your personal API key.

Here is how to open your .Renviron file for modification in your project:

require(usethis)

edit_r_environ(scope="project")

For a persistent loading of your API key, add the following line to your .Renviron file replacing "your_key" with your key.

AI_API_KEY="your_key"

NOTE: After setting up your API key in the .Renviron file, either restart the R session or run readRenviron(".Renviron") to apply the changes.

If you however wish to set this variable only for a single session, you can use the following command:

Sys.setenv(AI_API_KEY="your_key")

Citing mergen

If you used mergen please cite:

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub. There you can also post further questions.

Metadata

Version

0.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows