Permalink
Browse files

Add dev_packages() function

  • Loading branch information...
1 parent 69dffe0 commit 930f196662fc7bcb188d2388f3a711296f4880eb @wch wch committed Aug 11, 2012
Showing with 20 additions and 0 deletions.
  1. +1 −0 NAMESPACE
  2. +9 −0 R/session-info.r
  3. +10 −0 man/dev_packages.Rd
View
@@ -11,6 +11,7 @@ export(clean_source)
export(clean_vignettes)
export(dev_meta)
export(dev_mode)
+export(dev_packages)
export(devtest)
export(document)
export(get_path)
View
@@ -5,3 +5,12 @@ loaded_packages <- function() {
names <- names[grepl("^package:", names)]
sub("^package:", "", names)
}
+
+#' Return a vector of names of packages loaded by devtools
+#' @export
+dev_packages <- function() {
+ packages <- vapply(loadedNamespaces(),
+ function(x) !is.null(dev_meta(x)), logical(1))
+
+ names(packages)[packages]
+}
View
@@ -0,0 +1,10 @@
+\name{dev_packages}
+\alias{dev_packages}
+\title{Return a vector of names of packages loaded by devtools}
+\usage{
+ dev_packages()
+}
+\description{
+ Return a vector of names of packages loaded by devtools
+}
+

0 comments on commit 930f196

Please sign in to comment.