swirldev / swirl

:cyclone: Learn R, in R.
http://swirlstats.com
Other
1.14k stars 600 forks source link

Problem with Lesson5(Base Plotting Sysytems) for Exploratory Data Analysis #632

Open andwil47 opened 7 years ago

andwil47 commented 7 years ago

At 26%, when completing the task specified, the program doesn't see it as completed correctly, although the boxplot is displayed correctly with color and labels as specified in the code. Here is a copy of what occurs and what I have typed Let's call boxplot again to specify labels. (Use the up arrow to | recover the previous command and save yourself some typing.) We'll | add more arguments to the call to specify labels for the 2 axes. | Set xlab equal to "Month" and ylab equal to "Ozone (ppb)". Specify | col.axis equal to "blue" and col.lab equal to "red". Try this now.

boxplot(Ozone~Month,airquality,xlab="Month",ylab="Ozone(ppb)",col.axis="blue",col.lab="red")

| Try again. Getting it right on the first try is boring anyway! Or, | type info() for more options.

| Type boxplot(Ozone~Month, airquality, xlab="Month", ylab="Ozone | (ppb)",col.axis="blue",col.lab="red") at the command prompt.

boxplot(Ozone~Month,airquality,xlab="Month",ylab="Ozone(ppb)",col.axis="blue",col.lab="red")

| You almost had it, but not quite. Try again. Or, type info() for | more options.

Can anyone suggest a fix for this?

andwil47 commented 7 years ago

Tried it again tonight, and it worked!! Did the same command, so i'm not sure what is different now, but happy that I can move forward.

Rohitkg12 commented 6 years ago

If anyone is still looking for the solution or is faceing the same issue.

Incorrect answer

boxplot(Ozone~Month, airquality, xlab="Month", ylab="Ozone(ppb)",col.axis="blue",col.lab="red"

Correct answer

boxplot(Ozone~Month, airquality, xlab="Month", ylab="Ozone (ppb)",col.axis="blue",col.lab="red"

The difference is the extra space between Ozone and (ppb). I am posting the solution since I faced the same issue.

Dodo-byt commented 3 years ago

Thanks Rohit! It worked for me.