Displaying 18 results from an estimated 18 matches for "fixinnamespac".
Did you mean:
fixinnamespace
2006 Jul 20
3
How do I modify an exported function in a locked environment?
...space:zoo>
Suppose for whatever reason I want output to be
in percent, so I'd like to modify the result to be
rval <- 100 * cumsum(y)/k
I cannot just copy the function and change it, as the namespace
mechanism ensures the rollmean.default in 'zoo' continues to be used.
If I use
fixInNamespace("rollmean.default", ns = "zoo")
I can edit the rval <- cumsum(y)/k line to read
rval <- 100 * cumsum(y)/k
save the file and exit the R.app GUI editor.
But this does not update the exported copy of the
function (the documentation for fixInNamespace says
this is the case)...
2006 Jul 20
3
How do I modify an exported function in a locked environment?
...space:zoo>
Suppose for whatever reason I want output to be
in percent, so I'd like to modify the result to be
rval <- 100 * cumsum(y)/k
I cannot just copy the function and change it, as the namespace
mechanism ensures the rollmean.default in 'zoo' continues to be used.
If I use
fixInNamespace("rollmean.default", ns = "zoo")
I can edit the rval <- cumsum(y)/k line to read
rval <- 100 * cumsum(y)/k
save the file and exit the R.app GUI editor.
But this does not update the exported copy of the
function (the documentation for fixInNamespace says
this is the case)...
2006 Jun 06
2
Editing a package with a NAMESPACE in place
I would like to edit a function from a package that uses a NAMESPACE, but in
place (after the package is loaded). As a simple example, I would like to
add a browser() call to a line in one of the functions for debugging
purposes. Since the function is in the package namespace, I can't do that
directly by simply making a copy of the function and editing it--that copy
doesn't get used. I
2005 Jul 12
1
getting panel.loess to use updated version of loess.smooth
...e is,
panel.loess still calls the original code in package:stats instead of
the new loess package, regardless of whether package:loess or
package:lattice comes first in the search list. If I export panel.loess
from the new package, then it can't see grid.lines anymore.
I'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.lin...
2012 Jan 29
1
Modifying whiskers in boxplots?
...tats = stats, n = n, conf = conf, out = x[out & nna])
}
posted by Mr. Jim Bowers, and additional posts discussing how to make
it work. The issue I am having is that all the posts say to edit
boxplot.default, but I have no idea how to actually do that. I've
tried fix(bowplot.default)
and fixInNamespace(...), but what do I actually change? I tried
including an argument "stats=myboxplot.stats" but that did not change
anything. Once it is changed, can I just use the same "boxplot(...)"
code as normal or
do I need to use myboxplot? I know this should be simple, but it is
gene...
2007 Feb 05
1
Build error with last R-devel tarball
...mirror, citation, citEntry, citHeader, citFooter, close.socket,
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, me...
2003 Jul 25
1
glmmPQL using REML instead of ML
Hi,
In glmmPQL in the MASS library, the function uses
repeated calls to the function lme(), using ML. Does
anyone know how you can change this to REML? I know
that in lme(), the default is actually set to REML and
you can also specify this as 'method=REML' or
'method'ML' but this isn't applicable to glmmPQL().
I'd appreciate any help or advice!
Thanks,
Emma
2011 May 31
1
assignInNamespace and new bindings
Hello,
assignInNamespace refuses to assign an object to a name that is not
already used in the namespace.
Something like this would make it possible:
--- src/library/utils/R/objects.R (revision 56024)
+++ src/library/utils/R/objects.R (working copy)
@@ -252,8 +252,9 @@
stop("environment specified is not a package")
ns <- asNamespace(substring(nm, 9L))
2009 Jun 01
1
survreg.distributions() error
Hi there.
I am receiving an unexpected error message when creating a new
distribution for the survreg() function in the survival package. I
understand the survival.distributions() function and have been
following the Cauchy example provided in the help file.
My goal is to use survreg to fit a gamma distribution to interval
censored data.
Here is a simple example of what I'm trying to do.
2008 Aug 10
1
print data frames without row names (within a list)
This should be an easy one, but I could not find the answer in the
obvious places.
one <- data.frame(a=c(1,2,3),b=c("x","y","z"))
two <- data.frame(a=c(4,5,6),b=c("q","r","s"))
> print(one)
a b
1 1 x
2 2 y
3 3 z
> print(one,row.names=F)
a b
1 x
2 y
3 z
So far, so good, but how do I do this if the data frames are bound
2004 Jan 05
1
lda() called with data=subset() command
Hi
I have a data.frame with a grouping variable having the levels
C,
mild AD,
mod AD,
O and
S
since I want to compute a lda only for the two groups 'C' and 'mod AD' I
call lda with data=subset(mydata.pca,GROUP == 'mod AD' | GROUP == 'C')
my.lda <- lda(GROUP ~ Comp.1 + Comp.2 + Comp.3 + Comp.4+ Comp.5 +
Comp.6 + Comp.7 + Comp.8 ,
2004 Oct 13
2
debugging non-visible functions
Hi,
I would like to step-through a non-visible function. but apparently I
don't know enough about namespaces to get that to work:
> methods(predict)
... deleted lines ...
[27] predict.rpart* predict.smooth.spline*
[31] predict.survreg.penal*
Non-visible functions are asterisked
> debug(predict.rpart)
Error: Object "predict.rpart" not found
>
2011 Jan 28
2
Injecting code in a package?
Dear list,
I''ve had this a few times now, and wonder if this is possible:
I''m using a package, often for plotting something, but I want to tune the
way the plotting goes, in a way that was not foreseen by the maker of the
package.
Now, most of the time, these kinds of R functions (say pkg::plot.something)
call into other R functions (say pkg::plot.something.internal), and
2011 Apr 17
3
Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...
Hi all,
I'm just getting started with R and I would appreciate some help. I'm having
trouble creating a boxplot with whiskers at the 95th and 5th percentiles
instead of at 1.5 * IQR. I have read the relevant documentation, and checked
existing mails on this topic. I found a small modification that should work
: https://stat.ethz.ch/pipermail/r-help/2001-November/016817.html and tried
to
2003 Apr 16
2
R-1.7.0 is released
...uggested 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 with gzip.
loa...
2003 Apr 16
2
R-1.7.0 is released
...uggested 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 with gzip.
loa...
2004 Apr 12
1
R 1.9.0 is release
...Hyndman).
o array() and matrix() now allow 0-length `data' arguments for
compatibility with S.
o as.data.frame() now has a method for arrays.
o as.matrix.data.frame() now coerces an all-logical data frame
to a logical matrix.
o New function assignInNamespace() parallelling fixInNamespace.
o There is a new function contourLines() to produce contour
lines (but not draw anything). This makes the CRAN package
clines (with its clines() function) redundant.
o D(), deriv(), etc now also differentiate asin(), acos(), atan(),
(thanks to a contribution of Kasper Kristensen)....
2004 Apr 12
1
R 1.9.0 is release
...Hyndman).
o array() and matrix() now allow 0-length `data' arguments for
compatibility with S.
o as.data.frame() now has a method for arrays.
o as.matrix.data.frame() now coerces an all-logical data frame
to a logical matrix.
o New function assignInNamespace() parallelling fixInNamespace.
o There is a new function contourLines() to produce contour
lines (but not draw anything). This makes the CRAN package
clines (with its clines() function) redundant.
o D(), deriv(), etc now also differentiate asin(), acos(), atan(),
(thanks to a contribution of Kasper Kristensen)....