VIBE CODE a Copilot Agent to analyze data in a Quarto Doc (VS Code)
WHAT IS THE AIM OF THIS VIDEO? In this video I show you how to create an AI agent in Visual Studio code to create a Quarto document that analyses and interests the results of research questions about a data file (in the R language). WHAT DO YOU NEED FOR THIS VIDEO? You need to have R installed on your system. It is available at It is best to also have the Quarto CLI installed. It is available at Make sure that all required packaged (look out for this imported by the agent) are installed in R. You can always run R and use the `install.packages("")` command. Visual Studio Code must be installed on your system. This is the IDE that I use for my agentic workflow. Make sure that the proper R extensions and the Quarto extension are installed in Visual Studio code. WHERE DO I FIND THE DATA FILE? The data file is on Github at THE AGENT INSTRUCTIONS Create a folder called `.github` and a subfolder called `instructions`. Create a file named `quarto.instructions.md` in this subfolder and populate it with this text. --- applyTo: "quarto" --- # Quarto Instructions - Start the document with a YAML header. - Use `title`, `author`, and `date` in the YAML header. ```yaml title: "Your Document Title" author: "Your Name" date: "`r Sys.Date()`" format: html execute: echo: true warning: false error: false ``` - Use the R language for code chunks. - Use markdown for content. - Create sections with `##` for main headings and `###` for subheadings. - Use `-` for bullet points and `1.` for numbered lists. - Use backticks for inline code and triple backticks for code blocks. - Use `` for images. - Interpret the results of all analysis and provide insights. - Use ggplot2 for data visualizations. THE PROMPT Copy the prompt below. The CSV file contains data on an experiment to determine the sensitivity, specificity, and the positive and negative predictive values of a new test for a specific disease. A total of 322 participants were selected for the experiment. To reflect the current prevalence of the disease in the community, which is 18.6%, 60 participants have the disease and 262 do not. The `Disease` column has two classes. `No` indicates the absence of the disease as measured by a gold-standard test, and `Yes` indicates the presence of the disease by the same gold-standard test. The `Test` column has two classes and records the results of the new test. `Negative` indicates a negative test for the disease and `Positive` indicates a positive rest for the disease. Analyze the data using the following plan: 1. Calculate and visualize the frequency and relative frequency of each class in each of the `Disease` and the `Test` columns. 2. Create a contingency table of the two columns and visualize the results. 3. Calculate and interpret the joint probabilities of the contingency table. 4. Calculate and interpret the marginal probabilities of contingency table. 5. Calculate and interpret the sensitivity and the specificity of the new test. 6. Calculate and interpret the positive and the negative predictive values of the new test. 7. Write a summary and conclusion of the analysis of the new test.
Download
0 formatsNo download links available.