Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

R has `rep` for replicate:

    rep(c("a", "b", "c", "d"), c(2, 1, 0, 2))
    c("a", "a", "b", "d", "d")


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: