daroczig / CEU-R-intro

Data Analysis 1a: Foundation of Data management in R @ CEU
35 stars 62 forks source link

Week5 -Plotting Summaries #27

Closed bonnyp closed 6 years ago

bonnyp commented 6 years ago

HI - I am getting error for the dt portion.

This is the instruction: "Create a new object called dsummaries that includes the average weight and average price of the diamonds from the dt dataset split by color. The column names should be: color, weight and price. Then pass this new object to ggplot2 and generate a scatterplot on the average weights and prices."

My output for dsummaries: color weight price 1: E 0.6578667 3076.752 2: I 1.0269273 5091.875 3: J 1.1621368 5323.818 4: H 0.9117991 4486.669 5: F 0.7365385 3724.886 6: G 0.7711902 3999.136 7: D 0.6577948 3169.954

The Error msg: Incorrect submission The contents of the variable dsummaries aren't correct. It has 7 rows and 3 columns, while it should have 5 rows and 3 columns.

Question:
How can there by 5 rows, when there are 7 color categories (E,I,J,H,F,G,D) , and we are splitting the dataset by color? Am I missing something? Thanks!

ltagai commented 6 years ago

I have the same question/issue

daroczig commented 6 years ago

Sorry for this -- the split variable should be cut instead of color. I've fixed the related instructions now, so if you refresh the page, it should now reflect that.