[情報] R: THE GOOD PARTS
[關鍵字]: 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.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.138.85
※ 文章網址: http://www.ptt.cc/bbs/R_Language/M.1396884365.A.A4B.html
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章