[情報] R: THE GOOD PARTS

作者: Wush978 (拒看低質媒體)   2014-04-07 23:26:02
[關鍵字]: R
[出處]: http://hackerretreat.com/r-good-parts/
[重點摘要]:
Summary: how to use the good parts
1. Never use the standard lib sapply, tapply etc functions. Back in the day I’d have said ‘use the hadleyverse’, but nowadays there are better, more performant alternatives.
2. Don’t use S4, and if you can, don’t use S3 (object systems).
3. Use the caret package instead of writing crossvalidation code yourself for each model.
4. Master the non-standard data structures (vectors, arrays, lists, data frames, and matrices). But don’t bother too much with data.frame. The days of data.frame are numbered.
5. Use data.table in every case you’d use data.frame. It has it’s own query syntax. Makes plyr etc obsolete.
6. Use traceback() and debug() on the console. Test on a clean workspace often. Use a proper visual debugger (both Rstudio and StatET have one).
7. Use the compiler package and pqR if you want ‘free’ improvements without touching your code.

Links booklink

Contact Us: admin [ a t ] ucptt.com