LabraMabra / M2019_4135

Data Processing and Visualization with R
3 stars 2 forks source link

Elizaveta_Grigoreva_HWs #2

Open faramer86 opened 5 years ago

faramer86 commented 5 years ago

HW_02

Nice job, but I have the following questions:

1) Comments are fine, but this code is surely over-commented. Some of them are unnecessary. If you use meaningful variable names (and you do:)) there is no need in comments. For example:

#Closeclose function return result as a list and close finaly - when I read this peace of code I just simple waste several second of my life :)

It isn't a big issue, but still. Use comment at the top of your function in order to explain what this function do, what is input, what is output. And if you use some specific function from external packages - comment it. Otherwise, use meaningful variable names.

2) Also you use data2 as an argument in function. At the same time you have data2 variable in your global environment. So it is confusing. It isn't an error, but just remember what is "global/local namespace".

3) try this one: subsetting(mtcars, 1:4, "drat") or subsetting(mtcars,1:5, 4)

All in all, good job! Fix last two issues.

lisagrigoreva commented 5 years ago

Hello, I've fixed it.

faramer86 commented 5 years ago

I believe third issue haven't solved. I have only subset without any calculations. Am I wrong?

faramer86 commented 5 years ago

HW_03

Issues:

1) I'm looking forward to have reply about last HW_02 issue. Fix it.

2) Why name of the first argument is "cars"? This argument have to be some dataframe, right? So use some meaningful name. And.. remember difference between "local namespace" and "global namespace".

3) Don't use "disp" as splitter. It is continuous variable.

4) Also, if you have one of the columns which is not numeric. For example, there is 3 numeric columns, and two factor columns. One of this two is splitter. Second one have to be splitted between subsetted dataframes. That means that your count table have to be splitted according to splitter variable.

That is all that I can say.. Great job!

lisagrigoreva commented 5 years ago

Hello, I fixed HW2, in process of fixing 3.

faramer86 commented 4 years ago

HW_02

Nice job! I'm OK with HW_02.

HW_03

I check your current version.

1) Hint:

sapply(subsetting, function(x) if (!is.numeric(x)) table(x))

This function return NULL if there is numeric data. You filter it out and do some other things, but.. Can it be improved? Can this function do some other things instead of returning NULL for numeric?

Write here when it will be ready.

lisagrigoreva commented 4 years ago

Hello, I fixed task 3 using lapply instead of sapply

faramer86 commented 4 years ago

HW_03

I'm OK with your solution.

HW_04

Looking forward to receiving final version. Now it has several bugs.

lisagrigoreva commented 4 years ago

Hello, I updated HW04.

faramer86 commented 4 years ago

HW_4

Issues:

1) Column "Event" - set some character value to NA 2) Check str(final_df). Almost all of the numeric columns are stored as character. It is an issue :)

HW_5

I'm OK with your solution.

Notes: 1) dplyr::select_if() - it's good style :)

HW_6

Issues A:

1) line 16 -> iris_long_before there is no such variable. 2) Why do you use such 1.Sepal row indexes?

Issues B:

1) Try to compare your first plot (gapminder_2007) and plot from presentation. They are not the same. Hint: log10 2) Same issue with combined. Hint: ylim

HW_APP (7 in your indexing)

Excellent. Good job :)

HW_7 is missing.

Link (Visualizing data 2): https://drive.google.com/drive/folders/1tRI0qx1ZAGViMdUu6FxFuwUK3rCuBT0i?sort=13&direction=a

lisagrigoreva commented 4 years ago

Hello, I uploaded HW_6 part 2=HW7 and fixed all of previous issues

faramer86 commented 4 years ago

HW_4

Cool.

HW_6

Good job.

HW_7 (HW_6 part 2)

Cool.

P.S.

All done, congrats! Wish you good luck with your project :)