search for: isbasenamespac

Displaying 5 results from an estimated 5 matches for "isbasenamespac".

Did you mean: isbasenamespace
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) } <environment: namespace:base> One possible way to fix this could be to changed to e.g. if (isBaseNamespace(ns)) ls(envir=baseenv(), all = TRUE) Observed with R 2.5.0 & R 2.6.0...
2015 Jan 26
2
speedbump in library
...ral if we are interested in readable code. An > efficient implementation would be just a bonus. Good point (readability), and thank you for the support! Note one slight drawback with your name (which is clearly better than mine first proposal): We'd have the three functions named isBaseNamespace(ns) isNamespace(ns) isNamespaceLoaded(name) where 'name' is really different from 'ns', namely : > isNamespace("stats") [1] FALSE > isNamespace(asNamespace("stats")) [1] TRUE but > isNamespaceLoaded("stats") [1] TRUE...
2015 Jan 26
0
speedbump in library
...An > > efficient implementation would be just a bonus. > > Good point (readability), and thank you for the support! > > Note one slight drawback with your name (which is clearly > better than mine first proposal): > We'd have the three functions named > > isBaseNamespace(ns) > isNamespace(ns) > isNamespaceLoaded(name) > > where 'name' is really different from 'ns', namely : > > > isNamespace("stats") > [1] FALSE > > isNamespace(asNamespace("stats")) > [1] TRUE > > but &gt...
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
2015 Nov 06
4
Puzzled by eval
I am currently puzzled by a seach path behavior. I have a library of a dozen routines getlabs(), getssn(), getecg(), ... that interface to local repositories and pull back patient information. All have a the first 6 arguments in common, and immediately call a second routine to do initial processing of these 6. The functions "joe" and "fred" below capture the relevant