DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Spotlight Queries Of R Documentation

04.10.2006
| 1431 views |
  • submit to reddit
        // from http://comments.gmane.org/gmane.comp.lang.r.mac/642
// Use Spotlight to query R documentation

spotlight<-function(word) {
place<-paste(Sys.getenv("R_HOME"),"/library/",sep="")
string<-paste("mdfind -onlyin",place,word,"|",getOption("pager"))
system(string, intern=TRUE)
}