While doing this Lab I was curious to see if AI is able to create a full R mardown file completely by itslef. I honestly thought that it would take a few attempts for AI to make a functioning file. After uploading the file and answering some question on what I exactly wanted from the r markdown file it, claude was able to generate a RMD file. It wanted me to use the RMD file to create the R markdown file but I did not want to use that method. I asked claude to write a singular script that i can upload into R. It generated the text for me to simply copy and paste into R for the final R markdown file.
After doing this Lab I found it nice that AI is able to assist me in creating R markdown files. Now knowing this I will probably use AI in the future whenver I want to create my own website using R beccause of how simple it is now with the help of claude. I noticed that my groupmate was expericing some troubles with other AI platforms as they were generating scripts that were missing crucial bits of code that would not allow the file to knit properly. After sometime he was able to fix this by using gemini AI instead of chatgpt, this showed me how much better cladue was at creating R markdown files so I will continue to use them for any R related questions.
This report analyzes survey responses from grocery store customers. Each row represents one customer who rated various aspects of their shopping experience on a 1–5 Likert scale, alongside demographic variables (Gender, Age, Education).
The analysis covers four areas:
## Rows: 22 | Columns: 18
## Missing values: 0
| Staff_Helpful | Recommend | Come_Again | All_Products | Professionalism | Limitation | Online_Grocery | Delivery | Pickup | Find_Items | Other_Shops | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Min. :1.000 | Min. :1.000 | Min. :1.000 | Min. :1.000 | Min. :1.000 | Min. :1.0 | Min. :1.000 | Min. :1.000 | Min. :1.000 | Min. :1.000 | Min. :1.000 | |
| 1st Qu.:1.000 | 1st Qu.:1.000 | 1st Qu.:1.000 | 1st Qu.:1.250 | 1st Qu.:1.000 | 1st Qu.:1.0 | 1st Qu.:2.000 | 1st Qu.:2.000 | 1st Qu.:2.000 | 1st Qu.:1.000 | 1st Qu.:1.250 | |
| Median :1.000 | Median :1.000 | Median :1.000 | Median :2.000 | Median :1.000 | Median :1.0 | Median :2.000 | Median :3.000 | Median :2.000 | Median :1.000 | Median :2.000 | |
| Mean :1.591 | Mean :1.318 | Mean :1.455 | Mean :2.091 | Mean :1.409 | Mean :1.5 | Mean :2.273 | Mean :2.409 | Mean :2.455 | Mean :1.455 | Mean :2.591 | |
| 3rd Qu.:2.000 | 3rd Qu.:1.000 | 3rd Qu.:2.000 | 3rd Qu.:2.000 | 3rd Qu.:2.000 | 3rd Qu.:2.0 | 3rd Qu.:3.000 | 3rd Qu.:3.000 | 3rd Qu.:3.000 | 3rd Qu.:2.000 | 3rd Qu.:3.750 | |
| Max. :3.000 | Max. :3.000 | Max. :3.000 | Max. :5.000 | Max. :3.000 | Max. :4.0 | Max. :3.000 | Max. :3.000 | Max. :5.000 | Max. :3.000 | Max. :5.000 |
| Segment | Customers | Avg Rating | Top Category | Weakest Category |
|---|---|---|---|---|
| Segment 1 | 10 | 1.60 | Other_Shops | Recommend |
| Segment 2 | 4 | 2.32 | All_Products | Pickup |
| Segment 3 | 8 | 1.98 | Pickup | Come_Again |
Interpretation guidance: - Segments with higher average ratings indicate loyal, satisfied shoppers. - Low scores in Delivery or Online_Grocery highlight digital service gaps. - Demographic breakdowns per segment can guide targeted marketing campaigns.
Report generated with R Markdown · 2026-03-26 ’
writeLines(rmd_content, “grocery_analysis.Rmd”) message(“Rmd file written. Knitting now…”)
rmarkdown::render( input = “grocery_analysis.Rmd”, output_file = “grocery_analysis.html” )
message(“Done! Report saved as grocery_analysis.html”) ```