3

Sometimes, I got some R code without the information of loaded packages. For example,

x <- thisisafunction(data)

and I have no idea which package thisisafunction is coming from. I want to find all packages which contain thisisafunction function in CRAN. This package may or may not have been installed in the current machine. Is it possible to do this? I tried googling the package name, sometimes it works but sometimes it doesn't.

JACKY88
  • 3,391
  • 5
  • 32
  • 48
  • 11
    `library(sos); findFn("thisisafunction")` – Roland May 29 '13 at 15:40
  • 1
    @Roland I guess the OP is seeing code snippets where the preamble/package-loading part is missing. If so, yours is the only correct answer so far... +1 to the question and comment; neat package. – Frank May 29 '13 at 15:53
  • 1
    @Roland - you should put that as an answer – eddi May 29 '13 at 16:21
  • Well @Roland is close but it is (strictly speaking) not an answer either as OP already mentioned Google, and dismisses it. `sos` is "merely" a constrained Google Search. The question is ultimately unanswerable for random snippets of code. – Dirk Eddelbuettel May 29 '13 at 16:23
  • 1
    note that there's more R packages than those on CRAN. There's rforge, r-forge, bioC, github, bitbucket, googlecode, etc. – baptiste May 29 '13 at 16:23

0 Answers0