3 ms·
If you've followed my posts on Hacker News, you may notice I'm a HUGE user of R. I actually started using R because the classes I took as a statistics minor in
by minimaxir 11y ago
If you've followed my posts on Hacker News, you may notice I'm a HUGE user of R. I actually started using R because the classes I took as a statistics minor in college required the use of R. And it sucked, mostly because trying to reimplement statistical algorithms can be very fussy (it's not as well suited toward linear algebra as MATLAB and Octave)
I note that because the curriculum seems to focus on more machine-leaning-esque algorithms like Random Forests and SVM, which are heavy in linear algebra, but the class itself states it is not math heavy.
In R, you typically implement these algorithms...by installing a package from CRAN that contains the algorithm. (I skimmed through the linked book at that appears to be the case)
Nothing wrong with that, of course. Although a more proper intro to R would require teaching how to use the factor data type without going insane. (Processing data is half the battle, and something I wish I learned at college)
- carbocation 11y agoThe difference between writing software (including machine learning, but a ton of useful software has to lunge data of some sort of another) and learning programming reminds me of the difference between learning medicine in school and then learning how to actually practice medicine in residency.
- IndianAstronaut 11y agoTo add to that, many of the practical data problems I run into almost never use most of the techniques you learn in classes. Either it is a small subset which can be more robust in data handling, or it is a technique or package not covered in classwork.
- hadley 11y agoOr just avoid using factors in the first place. Character vectors are usually more appropriate and a modern ingest pipeline won't produce factors in the first place.
- minimaxir 11y agoThanks to readr's stringsAsFactors=F default, I've fortunately been avoiding unexpected issues due to factoring. However, the default R functions still load data as factors and I have bad memories of that catching me by surprise, particularly when performing mathematical operations on vectors which are secretly factors and silently getting wrong results. I still need to use factors with ggplot2 though for discrete orders. (E.g bar chart sorting)
- hadley 11y agoYeah I've been thinking about making a new class based on top of character vectors that allows custom ordering
- rabboRubble 11y agoAfter much frustration with a project I'm working on, yesterday I stumbled across using data.frame instead of cbind. Are you maybe Hadley Wickham? If yes, you probably already know this :-) My brother bought me "Advanced R" for Christmas. edit: data.frame, not read.table
- washedup 11y agoSo glad that stringsAsFactors exists. Saves me a lot of time.
- washedup 11y agoCouldn't agree more. New users I help often get stuck when they run into factors. Skip the whole class! Strings are the way to go.
- baldfat 11y agoreadr - Doesn't place factors in the first place. R reader written by Hadley Wickham https://cran.r-project.org/web/packages/readr/README.html https://cran.r-project.org/web/packages/readr/README.html
- 11y ago