search for: loadednamespace

Displaying 20 results from an estimated 59 matches for "loadednamespace".

Did you mean: loadednamespaces
2015 Jan 26
2
speedbump in library
>>>>> Winston Chang <winstonchang1 at gmail.com> >>>>> on Fri, 23 Jan 2015 10:15:53 -0600 writes: > I think you can simplify a little by replacing this: > pkg %in% loadedNamespaces() > with this: > .getNamespace(pkg) almost: It would be !is.null(.getNamespace(pkg)) > Whereas getNamespace(pkg) will load the package if it's not already > loaded, calling .getNamespace(pkg) (note the leading dot) won't load > the package....
2015 Jan 26
2
speedbump in library
...) [1] TRUE > isNamespaceLoaded(asNamespace("stats")) Error in as.vector(x, "symbol") : cannot coerce type 'environment' to vector of type 'symbol' > So, from my (non native English view) a slightly more suggestive function name may be isLoadedNamespace(name) or using Luke's original language, still present in the C code, isRegisteredNamespace(name) but I would prefer the former, isLoadedN..S..() Martin > On Mon, Jan 26, 2015 at 3:36 AM, Martin Maechler > <maechler at lynne.stat.math.ethz.ch> wrote: >>&gt...
2015 Jan 08
4
unloadNamespace
...do nothing or give an error. I only discovered this when trying to clean up to debug another problem. R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" and R Under development (unstable) (2015-01-02 r67308) -- "Unsuffered Consequences" ... Type 'q()' to quit R. > loadedNamespaces() [1] "base" "datasets" "graphics" "grDevices" "methods" "stats" [7] "utils" > unloadNamespace("tseries") # loads zoo ? > loadedNamespaces() [1] "base" "datasets" "grap...
2015 Jan 22
3
speedbump in library
...file.exists(file.path(dirs, - "DESCRIPTION"))]) - } + paths <- file.path(lib.loc, pkg) + paths <- paths[ file.exists(file.path(paths, "DESCRIPTION")) ] if(use_loaded && pkg %in% loadedNamespaces()) { dir <- if (pkg == "base") system.file() else getNamespaceInfo(pkg, "path") Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com
2015 Jan 26
0
speedbump in library
...<maechler at lynne.stat.math.ethz.ch> wrote: >>>>>> Winston Chang <winstonchang1 at gmail.com> >>>>>> on Fri, 23 Jan 2015 10:15:53 -0600 writes: > > > I think you can simplify a little by replacing this: > > > pkg %in% loadedNamespaces() > > with this: > > .getNamespace(pkg) > > almost: It would be > > !is.null(.getNamespace(pkg)) > > > Whereas getNamespace(pkg) will load the package if it's not already > > loaded, calling .getNamespace(pkg) (note the leading do...
2015 Jan 26
0
speedbump in library
isLoadedNamespace() sounds fine to me.. Thanks for addressing this, Michael On Mon, Jan 26, 2015 at 5:51 AM, Martin Maechler < maechler at lynne.stat.math.ethz.ch> wrote: > >>>>> Michael Lawrence <lawrence.michael at gene.com> > >>>>> on Mon, 26 Jan 2015 05:12:5...
2007 Mar 26
4
a very small query
Hi All what is the command to give me the listing of the loaded packages. I mean which are active and not the listing of all the installed packages as given by library() thanks in advance -gaurav ============================================================================================ DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}
2020 Jul 19
6
Speed-up/Cache loadNamespace()
...e our packages stored on a (rather slow) network drive and need to invoke short R scripts (using RScript) in a timely manner. Most of the script's runtime is spent with package loading using library() (or loadNamespace to be precise). Is there a way to cache the package namespaces as listed in loadedNamespaces() and load them into memory before the script is executed? My first simplistic attempt was to serialize the environment output from loadNamespace() to a file and load it before the script is started. However, loading the object automatically also loads all the referenced namespaces (from the slow...
2015 Jan 09
0
unloadNamespace
...e first thing that unloadNamespace does is this: ns <- asNamespace(ns, base.OK = FALSE) If you call asNamespace("tseries"), it calls getNamespace("tseries"), which has the side effect of loading that package (and its dependencies). One way to work around this is to check loadedNamespaces() before you try to unload a package. -Winston On Thu, Jan 8, 2015 at 9:45 AM, Paul Gilbert <pgilbert902 at gmail.com> wrote: > In the documentation the closed thing I see to an explanation of this is > that ?detach says "Unloading some namespaces has undesirable side effects&q...
2016 May 06
2
Is it possible to increase MAX_NUM_DLLS in future R releases?
...Good practice is to load namespaces as required, using requireNamespace. > > Extensive package dependencies in Bioconductor make it pretty easy to end up with dozen of packages attached or loaded. For instance > > library(GenomicFeatures) > library(DESeq2) > > > length(loadedNamespaces()) > [1] 63 > > length(getLoadedDLLs()) > [1] 41 > > Qin's use case is a shiny app, presumably trying to provide relatively comprehensive access to a particular domain. Even if the app were to load / requireNamespace() (this requires considerable programming discipline to en...
2012 May 09
4
Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.
...stalled 2 days ago so the R package should be current. Currently I am using the RGui (64-bit) for Windows. I can not read an Excel file into R from my computer. Have hours on this. Completely crazy!! I have the XLConnect package loaded. I think it is loaded because when I enter: > loadedNamespaces() [1] "base" "datasets" "graphics" "grDevices" [5] "methods" "rJava" "stats" "tools" [9] "utils" "XLConnect" "XLConnectJars" X...
2023 Jun 01
1
error in arfima...
...you, > Yours sincerely, > AKSHAY M KULKARNI Your problem is not (yet) reproducible (*) I've done the following in an "empty" (i.e. freshly started) R session, R 4.3.0: ----begin_R_transcript___save_as__arfima-ex.Rout__------------------------------ > > lN <- loadedNamespaces() > library(forecast) Registered S3 method overwritten by 'quantmod': method from as.zoo.data.frame zoo > options(width=75) > setdiff(loadedNamespaces(), lN) # -- see all the *!^@...! forecast loads: [1] "gtable" "dplyr" "tidys...
2015 Jan 23
0
speedbump in library
I think you can simplify a little by replacing this: pkg %in% loadedNamespaces() with this: .getNamespace(pkg) Whereas getNamespace(pkg) will load the package if it's not already loaded, calling .getNamespace(pkg) (note the leading dot) won't load the package. I can't speak to whether there are any pitfalls in changing the library path searching, though. -Wi...
2016 Jul 29
2
strange behavior in 'inherits' check for loaded S4 object
...:.requirePackage("digest") Loading required package: digest <environment: package:digest> attr(,"name") [1] "package:digest" attr(,"path") [1] "/Users/kevin/Library/R/3.3/library/digest" > "digest" %in% loadedNamespaces() [1] TRUE > "package:digest" %in% search() [1] TRUE On the other hand, if the package namespace has already been loaded, the package namespace is returned without attaching the package: > requireNamespace("digest") Loading required namespace: digest...
2023 May 31
1
error in arfima...
dear members, I am using arfima() from forecast package to model a time series. The following is the code: > LYGH[[202]] [1] 45.40 3.25 6.50 2.15 > arfima(LYGH[[202]]) Error in .fdcov(x, fdf$d, h, nar = nar, nma = nma, hess = hess, fdf.work = fdf$w) : NA/NaN/Inf in foreign function call (arg 5) I tried viewing .fdcov() with the following code:
2016 Dec 20
2
Request: Increasing MAX_NUM_DLLS in Rdynload.c
...ting there doing > nothing but occupying space. You can remove these, using: > > R.utils::gcDLLs() > > Maybe that will help you get through your tests (as long as you're > unloading packages). gcDLLs() will look at base::getLoadedDLLs() and > its content and compare to loadedNamespaces() and unregister any > "stray" DLLs that remain after corresponding packages have been > unloaded. > > I think it would be useful if R CMD check would also check that DLLs > are unregistered when a package is unloaded > (https://github.com/HenrikBengtsson/Wishlist-for-R...
2008 Nov 28
2
AIC function and Step function
I would like to figure out the equations for calculating "AIC" in both "step() function" and "AIC () function". They are different. Then I just type "step" in the R console, and found the "AIC" used in "step() function" is "extractAIC". I went to the R help, and found: "The criterion used is AIC = - 2*log L + k *
2012 Jan 10
1
S4 summary method not being called (VGAM)
...utils" "package:datasets" "package:methods" "Autoloads" "package:base" > print( load( "nf1.rda")) # which should implicitly load VGAM, but not attach it [1] "nf1" > search() # ...snipped. No explicit VGAM > loadedNamespaces() # ...snipped. VGAM is there at the end. > nf1 Call: vglm(formula = form, family = posbinomial, data = data, trace = TRUE) Coefficients: # ...snipped. The print() or show() or whatever method seems to get called OK > summary( nf1) Length Class Mode 1 vglm S4 # Hmmm... de...
2015 Jul 07
3
List S3 methods and defining packages
Hi, from the man page ?methods, I expected to be able to build pairs (class,package) for a given S3 method, e.g., print, using attr(methods(print), 'info'). However all the methods, except the ones defined in base or S4 methods, get the 'from' value "registered S3method for print", instead of the actual package name (see below for the first rows). Is this normal
2023 Jun 05
1
error in arfima...
...t; > AKSHAY M KULKARNI > Your problem is not (yet) reproducible (*) > I've done the following in an "empty" (i.e. freshly started) R > session, R 4.3.0: > ----begin_R_transcript___save_as__arfima-ex.Rout__------------------------------ > > > > lN <- loadedNamespaces() > > library(forecast) > Registered S3 method overwritten by 'quantmod': > method from > as.zoo.data.frame zoo > > options(width=75) > > setdiff(loadedNamespaces(), lN) # -- see all the *!^@...! forecast loads: > [1] "gtable"...