Displaying 17 results from an estimated 17 matches for "getfromnamespace".
2016 May 01
2
Storage of byte code-compiled functions in sysdata.rda
...ome reproducible example -- even in two degrees of
completeness ;-): see below.
Thanks again, Peter
%-----------------------------------
(I) first example
%-----------------------------------
Just to reproduce the error, on r-devel, try:
install.packages("RobAStRDA")
require(RobAStRDA)
getFromNamespace(".RMXE", ns = "RobAStRDA")[["GEVFamily"]][["fun.N"]][[1]](1.3)
%-----------------------------------
(II) an example also giving the context
%-----------------------------------
For the "complete" story, not only the R-code needs to be given, but al...
2016 May 01
2
Storage of byte code-compiled functions in sysdata.rda
...Starting from several x-y grids, in the sysdata.rda file of RobAStRDA, we store the results
of calls to approxfun/splinefun to these grids from within a session with pkg RobAStRDA
require()d. From pkg RobExtremes we then call these interpolating functions by means of
a call (essentially) as:
getFromNamespace(".RMXE", ns = "RobAStRDA")[["GEVFamily"]][["fun.N"]][[1]](1.3)
upon which we get the announced "Error in fct(x) : byte code version mismatch" while the same
code does work for R-3.1.3.
The list element "fun.N" in the above call already...
2016 May 05
0
Storage of byte code-compiled functions in sysdata.rda
I can't reproduce the more complex version. But the package on CRAN
fails in the same way on 3.2.3 and 3.3.0.
The problem is that your sysdata.rda includes a function that is
generating this error. If you do
f <- getFromNamespace(".RMXE", ns ="RobAStRDA")[["GEVFamily"]][["fun.N"]][[1]]
g <- get("fct", environment(f))
and look at the byte code for g with compiler::disassemble or the
utility I'll paste in below you get
> getbc(g)
list(8L, BCMISMATCH.OP)
The only w...
2006 Oct 13
2
bug: Editing function formals deletes the environment
...of a package, to simplify the
interface.
I'd rather not change the package, although I could.
There's a hidden function whose defaults I wish to change.
I'm using R 2.3.1 for macosX. Upgrading is not an option.
This is what I do:
library(R2HTML)
# get the function to modify
x = getFromNamespace("HTML.data.frame", "R2HTML")
# change the default for an argument
formals(x)["Border"]=list(NULL)
# put the function back
assignInNamespace("HTML.data.frame", x, "R2HTML")
#test the function:
HTML(data.frame(1:2), file=stdout())
Error: could not...
2016 May 01
0
Storage of byte code-compiled functions in sysdata.rda
...-y grids, in the sysdata.rda file of RobAStRDA, we store the results
> of calls to approxfun/splinefun to these grids from within a session with pkg RobAStRDA
> require()d. From pkg RobExtremes we then call these interpolating functions by means of
> a call (essentially) as:
>
> getFromNamespace(".RMXE", ns = "RobAStRDA")[["GEVFamily"]][["fun.N"]][[1]](1.3)
>
> upon which we get the announced "Error in fct(x) : byte code version mismatch" while the same
> code does work for R-3.1.3.
>
> The list element "fun.N" i...
2007 Jan 30
2
lattice: how to get 'lattice.theme'
I'm using lattice 0.14. As of version 0.5 the Changes says there is a
global list called 'lattice.theme'. How can I access this? I have tried
many ways, including
options(lattice.theme)
lattice.getOption("lattice.theme")
get("lattice.theme", envir = .LatticeEnv)
getFromNamespace("lattice.theme", "lattice")
getAnywhere("lattice.theme")
(both before and after a call to trellis.device)
Thanks,
Ben
2005 Jul 12
1
getting panel.loess to use updated version of loess.smooth
...39;ve tried using fixInNamespace to change the loess.smooth in
package:stats to point to the updated simpleLoess, but it is locked. At
http://tolstoy.newcastle.edu.au/R/help/04/05/0428.html it was suggested
to write a new panel function. However I still need to be able to access
grid.lines, and getFromNamespace("grid.lines","grid") is not the way to
do this.
Any ideas? This seems simple but I'm stumped.
Thanks,
Ben
2005 Apr 28
1
strange behaviour of importFrom directive in name space
...uot;, "readSDM",
"removeCensored", "setPradaPars",
"smoothScatter", "thresholds")
importFrom("KernSmooth", "bkde2D")
importFrom("RColorBrewer", "brewer.pal")
importFrom("utils", "getFromNamespace", "assignInNamespace")
importFrom("MASS", "cov.rob")
S3method("$", "cytoFrame")
exportClasses("cytoFrame", "cytoSet")
exportMethods("colnames", "colnames<-",
"description", &qu...
2005 Apr 28
1
strange behaviour of importFrom directive in name space
...uot;, "readSDM",
"removeCensored", "setPradaPars",
"smoothScatter", "thresholds")
importFrom("KernSmooth", "bkde2D")
importFrom("RColorBrewer", "brewer.pal")
importFrom("utils", "getFromNamespace", "assignInNamespace")
importFrom("MASS", "cov.rob")
S3method("$", "cytoFrame")
exportClasses("cytoFrame", "cytoSet")
exportMethods("colnames", "colnames<-",
"description", &qu...
2007 Feb 05
1
Build error with last R-devel tarball
...combn, compareVersion, co
ntrib.url, count.fields, data, data.entry, dataentry, de, de.ncols, de.restore,
de.setup, debugger, d
emo, download.file, download.packages, dump.frames, edit, emacs, example,
file_test, file.edit, find,
fix, fixInNamespace, flush.console, formatOL, formatUL, getAnywhere,
getFromNamespace, getS3method,
glob2rx, head, head.matrix, help, help.search, help.start, history,
index.search, install.packages, i
nstalled.packages, limitedLabels, loadhistory, localeToCharset, ls.str, lsf.str,
make.packages.html,
make.socket, memory.limit, memory.size, menu, methods, mirror2html, modifyList,
ne...
2006 Apr 03
1
do.call method within namespace
How does one go about invoking a method within a namespaced
package if that package has not been loaded via library
method?
Given "mypackage" and method "foo" within:
mypackage::foo(1, 2, 3)
Executing the same method's function call:
do.call("foo", list(1, 2, 3))
didn't work. Nor did the following:
do.call("mypackage::foo", list(1, 2,
2003 Jul 31
1
namespace magic
I'm confused about name spaces. This morning I installed the
boot package because I wanted to look at bca.ci. So I did
library(boot), but then I had,
> bca.ci
Error: Object "bca.ci" not found
I had a look in the boot R directory and bca.ci was there as expected.
So then I took a look at the NAMESPACE file for the boot package and saw
that bca.ci wasn't exported. I tried
2009 Nov 05
2
Error in nls Error in if(any(start < low || start > upp)) {: missing value when TRUE/FALSE needed
Hi,
I got this error every time when I put upper and lower bound on my
parameters in nls. I'm not quite sure what this error is about. I also
wanted to find the content of nls_port_fit. But typing this directly
into R doesn't seem to give any result out.
I also tried to see the content of If anybody could shed some light
I'd greatly appreciate. Thank you.
rc
2003 Jun 02
1
Ploting rpart objects / namespace problems
I've written a small adaptation of the text.rpart function of the rpart
package to better suite my tree presentation needs (I basically left the code
untouched, only changing some numbers relating to label positioning).
When I changed to version 1.7.0 this function stopped working printing the
error :
couldn't find function "rpartco"
As far as I understand this has to do
2017 Sep 17
2
Shiny App inside R Package
Dear List,
I have a wrapper function that creates a Shiny App, as illustrated below.
I'd like to include the function myApp() inside a package. I'd appreciate
your guidance here, as I could not find good instructions on this online.
myApp <- function(x) {
require(shiny)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n",
2003 Apr 16
2
R-1.7.0 is released
...39; for example() (suggested by Andy Liaw).
o New function file.symlink() to create symbolic file links
where supported by the OS.
o New generic function flush() with a method to flush connections.
o New function force() to force evaluation of a formal argument.
o New functions getFromNamespace(), fixInNamespace() and
getS3method() to facilitate developing code in packages with
namespaces.
o glm() now accepts `etastart' and `mustart' as alternative ways
to express starting values.
o New function gzcon() which wraps a connection and provides
(de)compression compatible...
2003 Apr 16
2
R-1.7.0 is released
...39; for example() (suggested by Andy Liaw).
o New function file.symlink() to create symbolic file links
where supported by the OS.
o New generic function flush() with a method to flush connections.
o New function force() to force evaluation of a formal argument.
o New functions getFromNamespace(), fixInNamespace() and
getS3method() to facilitate developing code in packages with
namespaces.
o glm() now accepts `etastart' and `mustart' as alternative ways
to express starting values.
o New function gzcon() which wraps a connection and provides
(de)compression compatible...