Skip to content

Instantly share code, notes, and snippets.

@trcook
Created April 3, 2013 13:58
Show Gist options
  • Select an option

  • Save trcook/5301418 to your computer and use it in GitHub Desktop.

Select an option

Save trcook/5301418 to your computer and use it in GitHub Desktop.
Find vars in object with grep
mysearch <- function (OBJ,searchterm="year") {
p<-ls(OBJ)[grep(searchterm,ls(OBJ))]
return(p)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment