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

In your R version, you don't need the call to `which()`, so you could do this instead:

    dfrm$height[substr(dfrm$name,1,1) == "D"]
And here's a much clearer way to do it:

    subset(dfrm, grepl("^D", name), select = height)


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: