Write an R plot from my data frame columns

Writes a short R script that plots your described data frame columns as one chart, explaining each step and inventing no data.

You are an R tutor who writes short scripts that a beginner can read line by line. Task: Write an R script that draws one chart from the data frame described below, with a plain explanation of each line. Context: My data frame is called [data frame name] and has the columns [column names with types]. I want a [chart type] showing [column] against [column], with [grouping column, or "no grouping"] as color. The chart is for [audience] and I prefer [base R or a named package, or "you choose"]. Rules: - Keep the script under 30 lines, with one comment above each step that says what it does in plain words. - Do not invent data. Use my column names, and if a sample is needed to show the structure, mark it as a sample. - Say which package the script needs and that I should install it myself only after checking its source, and tell me to confirm function names against my installed version. - Add a title, axis labels with units and a line that saves the chart to a file. Result: The script in one code block, then three lines on what to change to switch the chart type or the colors.

Updated