


Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.
Now, you no longer have to feel a headache when faced with a bunch of data! Today we are going to introduce this application, which allows you to chat with your data in English and then get the results!
This application is called RTutor. It calls OpenAI's Davinci (ChatGPT brother model) through the API. It can translate natural language into R scripts and then execute them on the Shiny platform in a few seconds. Generate R Markdown source files and HTML reports internally.
Locally, RTutor provides services in the form of R packages to help users perform preliminary analysis and visualization, and can be used even without R experience. But it will be better if you have R experience, which can save users time by eliminating the process of converting requests to R and directly providing code as a starting point.
- Project address: https://github.com/gexijin/RTutor
- Trial address: http://rtutor.ai/
We use mpg Taking the data set as an example, the mpg data set records the manufacturer, model, category, driver and fuel consumption of some cars in the United States in 1999 and 2008.
After understanding some background knowledge, you can talk to RTutor like this and use ggplot2 to create hwy (highway driving fuel consumption) vs. class (vehicle type, such as a two-seater car ) box plot. Color by category. Add jitter. RTutor then generates R language and outputs the result:
RTutor can also explain statistical concepts and help users decide which statistical test to use. It's at the level of an undergrad with a background in statistics and R courses, and the answers are imperfect but helpful.
RTutor can also generate code and even documents based on context:
The project author said: RTutor is completely a spare time project. After he learned about ChatGPT in his spare time, he completed the project in 10 days in his spare time.
Installation
This repository is updated frequently, sometimes several times a day. Therefore, the project author recommends that users reinstall before each use so that they always have the latest version.
library(remotes)install_github("gexijin/RTutor")
Using an API key with RTutor
Get an API key from OpenAI and use it with RTutor. There are several ways to do this.
- # Once the app launches, click Settings and paste the API key.
- Save this key as a text file named api_key.txt in your working directory.
- Create an environment variable named OPEN_API_KEY for Windows, Mac and Linux systems.
Please refer to the original project for more technical details.
The above is the detailed content of Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When developing a project that requires parsing SQL statements, I encountered a tricky problem: how to efficiently parse MySQL's SQL statements and extract the key information. After trying many methods, I found that the greenlion/php-sql-parser library can perfectly solve my needs.

In Laravel development, dealing with complex model relationships has always been a challenge, especially when it comes to multi-level BelongsToThrough relationships. Recently, I encountered this problem in a project dealing with a multi-level model relationship, where traditional HasManyThrough relationships fail to meet the needs, resulting in data queries becoming complex and inefficient. After some exploration, I found the library staudenmeir/belongs-to-through, which easily installed and solved my troubles through Composer.

When managing WordPress websites, you often encounter complex operations such as installation, update, and multi-site conversion. These operations are not only time-consuming, but also prone to errors, causing the website to be paralyzed. Combining the WP-CLI core command with Composer can greatly simplify these tasks, improve efficiency and reliability. This article will introduce how to use Composer to solve these problems and improve the convenience of WordPress management.

When developing a Geographic Information System (GIS), I encountered a difficult problem: how to efficiently handle various geographic data formats such as WKT, WKB, GeoJSON, etc. in PHP. I've tried multiple methods, but none of them can effectively solve the conversion and operational issues between these formats. Finally, I found the GeoPHP library, which easily integrates through Composer, and it completely solved my troubles.

When developing PHP projects, ensuring code coverage is an important part of ensuring code quality. However, when I was using TravisCI for continuous integration, I encountered a problem: the test coverage report was not uploaded to the Coveralls platform, resulting in the inability to monitor and improve code coverage. After some exploration, I found the tool php-coveralls, which not only solved my problem, but also greatly simplified the configuration process.

Git Software Installation Guide: Visit the official Git website to download the installer for Windows, MacOS, or Linux. Run the installer and follow the prompts. Configure Git: Set username, email, and select a text editor. For Windows users, configure the Git Bash environment.

During Laravel development, it is often necessary to add virtual columns to the model to handle complex data logic. However, adding virtual columns directly into the model can lead to complexity of database migration and maintenance. After I encountered this problem in my project, I successfully solved this problem by using the stancl/virtualcolumn library. This library not only simplifies the management of virtual columns, but also improves the maintainability and efficiency of the code.

I'm having a tricky problem when developing a front-end project: I need to manually add a browser prefix to the CSS properties to ensure compatibility. This is not only time consuming, but also error-prone. After some exploration, I discovered the padaliyajay/php-autoprefixer library, which easily solved my troubles with Composer.
