Permalink
Browse files

Add loaded_packages function

  • Loading branch information...
1 parent 5063314 commit 8b9883c5448416c03e25218afad205dfac6ffbdb @wch wch committed Aug 11, 2012
Showing with 19 additions and 0 deletions.
  1. +1 −0 DESCRIPTION
  2. +1 −0 NAMESPACE
  3. +7 −0 R/session-info.r
  4. +10 −0 man/loaded_packages.Rd
View
@@ -62,3 +62,4 @@ Collate:
'env-utils.r'
'inst.r'
'metadata.r'
+ 'session-info.r'
View
@@ -29,6 +29,7 @@ export(load_all)
export(load_c)
export(load_code)
export(load_data)
+export(loaded_packages)
export(missing_s3)
export(ns_env)
export(on_path)
View
@@ -0,0 +1,7 @@
+#' Return a vector of names of attached packages
+#' @export
+loaded_packages <- function() {
+ names <- search()
+ names <- names[grepl("^package:", names)]
+ sub("^package:", "", names)
+}
View
@@ -0,0 +1,10 @@
+\name{loaded_packages}
+\alias{loaded_packages}
+\title{Return a vector of names of attached packages}
+\usage{
+ loaded_packages()
+}
+\description{
+ Return a vector of names of attached packages
+}
+

0 comments on commit 8b9883c

Please sign in to comment.