Soerendip
Soerendip

Reputation: 9148

R Error: could not find function "select"

select(data, starts_with("nase"))

Which package do I need to use the select function? How can I find out? Google, stackoverflow is not helpful atm.

Upvotes: 10

Views: 52833

Answers (3)

Harbhajan Singh
Harbhajan Singh

Reputation: 41

  1. Install package dplyr by running the command below:

    install.packages("dplyr")
    
  2. After this, load the library using the command below:

    library(dplyr)
    

Upvotes: 4

xirururu
xirururu

Reputation: 5508

I think, it should be the library dplyr

please see this link: http://rpackages.ianhowson.com/cran/dplyr/man/select.html

Upvotes: 6

Ben Bolker
Ben Bolker

Reputation: 226162

You're right that select is hard to look up:

library(sos)
findFn("select")

returns 7184 hits.

But you could always try

findFn("starts_with")

which gives only 14 hits in 9 packages, the first one of which leads to dplyr::select.

The other strategy would be to try to find clues in whatever place you found this code fragment in the first place ...

Upvotes: 9

Related Questions