Skip to content

Instantly share code, notes, and snippets.

View leoluyi's full-sized avatar
🎯
Focusing

Leo Lu leoluyi

🎯
Focusing
View GitHub Profile

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

write.Hmisc.SPSS = function(data, datafile, codefile) {
## Write an SPSS file from R with variable labels from the Hmisc package
# source:
# http://stackoverflow.com/questions/10181730/information-from-label-attribute-in-r-to-variable-labels-in-spss/10261534#10261534
# EXAMPLE DATA (see: http://stackoverflow.com/q/10181730/1270695)
#
# If you do not want to alter your original file, as in the example above,
# and if you are connected to the internet while you are using this function,
# you can try this self-contained function:
@leoluyi
leoluyi / recode_to.R
Last active August 29, 2015 14:10 — forked from hadley/recode.R
# forked from hadley/recode.R
# https://gist.github.com/hadley/2751ba61d1c7f4eaacab
recode_to <- function(df, ..., match = c("first", "last")) {
match <- match.arg(match)
cases <- lapply(list(...), as.case)
if (identical(match, "last")) cases <- rev(cases)
n <- nrow(df)