Displaying 8 results from an estimated 8 matches for "getnamespaceexport".
Did you mean:
getnamespaceexports
2007 May 15
1
getNamespaceExports("base") error
Hi!
>getNamespaceExports("base")
Error in ls(NULL, all = TRUE) : using 'as.environment(NULL)' is defunct
getNamespaceExports
function (ns)
{
ns <- asNamespace(ns)
if (isBaseNamespace(ns))
ls(NULL, all = TRUE)
else ls(getNamespaceInfo(ns, "exports"), all = TRUE)
}
<...
2012 Aug 26
2
Package "datasets" not exporting anything on a recent R-2.15.1-patched
Hi,
I just stumbled on the following apparent oddity: the package "datasets"
does not appear to export anything out of its namespace:
> ns_datasets <- getNamespace('datasets')
> getNamespaceExports(ns_datasets)
character(0)
Not the case with other packages (example here with "utils"):
> ns_utils <- getNamespace('utils')
> head(getNamespaceExports(ns_utils))
[1] "?" ".DollarNames" "adist" "alarm" "apr...
2025 May 23
1
FR: improve "use" function
...(package)[[1L]]
if (!requireNamespace(package, quietly = TRUE)) {
warning("there is no package called ", sQuote(package))
return (invisible(FALSE))
}
if (missing(include.only)) {
ns <- asNamespace(package, base.OK = FALSE)
include.only <- getNamespaceExports(ns)
}
if (package %in% .packages()) {
name <- paste0("package:", package)
previously_attached <- ls(name, all.names = TRUE)
if (!all(include.only %in% previously_attached)) {
detach(name, character.only = TRUE)
include.only &...
2013 Jan 02
2
listing all test functions in base R
Hi,
Is there a way to create a list of all statistical test functions in
base R? For example, there's t.test, ks.test, chisq.test, etc. I'd
like to create a list of these test names because I keep looking for
different tests but never know what's available. I'm thinking of a
regular expression statement but I'm not sure how this would work for
functions. Or is there a
2025 May 23
1
FR: improve "use" function
Hello,
Currently `use` fails silently if you try to attach functions from the
same namespace. It would be nice and more similiar to the use of
roxygen2 if it could add (and maybe even remove?) functions. Here is a
simple proof of concept I have posted on Stack Overflow [1]. Something
similar could be done within `use`. Of course, it would be preferable if
it didn't need to detach the
2025 May 27
1
FR: improve "use" function
...reNamespace(package, quietly = TRUE)) {
> warning("there is no package called ", sQuote(package))
> return (invisible(FALSE))
> }
> if (missing(include.only)) {
> ns <- asNamespace(package, base.OK = FALSE)
> include.only <- getNamespaceExports(ns)
> }
> if (package %in% .packages()) {
> name <- paste0("package:", package)
> previously_attached <- ls(name, all.names = TRUE)
> if (!all(include.only %in% previously_attached)) {
> detach(name, character.only = TR...
2007 Jun 28
0
R 2.5.1 is released
...turned a logical result when it was 'NA': it now
returns an NA of appropriate type (e.g. integer or double).
o grep(fixed = TRUE, perl = TRUE) ignored 'fixed', although it
was documented to ignore 'perl'
Same for [g]regexpr and [g]sub.
o getNamespaceExports("base") works again.
o runmed(c(), 1) no longer segfaults.
o qr.coef(QR, b) failed for an LAPACK-produced QR if b was
integer or for an over-determined system.
qr.solve() for an under-determined system produces a
solution with 0 and not NA for colum...
2007 Jun 28
0
R 2.5.1 is released
...turned a logical result when it was 'NA': it now
returns an NA of appropriate type (e.g. integer or double).
o grep(fixed = TRUE, perl = TRUE) ignored 'fixed', although it
was documented to ignore 'perl'
Same for [g]regexpr and [g]sub.
o getNamespaceExports("base") works again.
o runmed(c(), 1) no longer segfaults.
o qr.coef(QR, b) failed for an LAPACK-produced QR if b was
integer or for an over-determined system.
qr.solve() for an under-determined system produces a
solution with 0 and not NA for colum...