Thanks for taking the time to leave me a comment and let me know. And enjoy learning R
@michelainajohnson1737 Жыл бұрын
Are the presentation slides and assignments still available? If so, how might I access them?
@DannyArends Жыл бұрын
Slides, assignments, data, and answers are still available form my website: - lectures can be downloaded from here: dannyarends.nl/lectures/ - A zip file with all the assignments, answers and data is here: dannyarends.nl/assignments/Answers.zip in case you run into an issue (some people had issues with downloading via MS Edge), try another browser. If you still aren't able to download, or get a corrupted download, feel free to send me an email (my email address is in the about section) and I can send you the lectures, assignments, answers and data via email.
@datascience12742 жыл бұрын
Hi Danny, great content. I have a question about the code below. I don't seem to be able to explain why they included [,1] in the code. What is the theoretical explanation behind that? The code doesn't work without it. Thanks a lot in advance. for(i in c(2,6:11)){ a=(abs(scale(Data[,i])[,1])
@DannyArends2 жыл бұрын
That's tricky without knowing what Data is, my guess is that the scale function takes a vector, but outputs a matrix (perhaps you can input multiple vectors as separate parameters), so they use [,1] to take the first column of the matrix return by the scale function. I'd look at the code/help of ?scale to see what the output is. The code looks weird though, especially the Data = Data[a,] which overwrites Data. If nothing is lower than 3 the Data variable is put to NULL and the code would crash on the next iteration. I'd be very sceptical about this code. It contains too many code smells (hard coded column indexes, overwriting the variable your working with in the loop while you're working on it, using Data as variable name (non-speaking name), a variable named a). This code seems wrong and unmaintainable no one will know what it's supposed to do and how it does it in 9 months time.
@datascience12742 жыл бұрын
@@DannyArends thanks a lot. I think that probably the scale function returns a list. So Data[a,] takes all the TRUE values (less than 3) stored in a. Is that possible?
@DannyArends2 жыл бұрын
Yes it keeps the rows from Data for which the scaled absolute values are below 3 for the columns mentioned in the for-loop. Ps. If scale returns a list, using [[1]] instead of [,1] would be the preferred way of selecting the first element
@datascience12742 жыл бұрын
@@DannyArends thank you so much
@tamimhekmatpey2729 Жыл бұрын
How can I get a copy of the Zoom voting csv file?
@DannyArends Жыл бұрын
I don't think I have that file anymore (since I moved jobs) I will look for it in my backup see if I can find it.
@tamimhekmatpey2729 Жыл бұрын
@@DannyArends thanks Danny .. I learned a lot from your lecture on R . Job well done sir !