Displaying 20 results from an estimated 3000 matches similar to: "Using a function from splines.c in our package"
2003 Mar 26
1
formal methods and classes and capitalization conventions
Martin Maechler has suggested that I post this comment to r-devel. It was
originally posted to bioconductor.
---------------------------------
I'd like to raise the issue of a capitalization convention for naming
objects in R. Almost everything in R used to be lowercase but recently
there is increasing use of mixed upper/lower case to define names. There is
potential for using the
2003 Feb 19
3
Rcmd check does not recognize formal generic function as code object
Dear all,
I am trying to write a package using formal methods and classes from the
methods package. I have not been able to get the package to pass rcmd check
without warnings, because rcmd check does not recognize my generic
functions as code objects and therefore queries why they have documentation
entries.
I have isolated the problem in a very small trivial example which I give
below. I
2003 May 23
3
Documenting S4 classes; debugging them
1. I'm putting together my first package that uses S4 classes and
objects. I'd like to document them, but I'm not sure what the
documentation should look like, and package.skeleton doesn't produce
any at all for the classes or methods.
Are there any good examples to follow?
2. How do I do the equivalent of debug(foo), when foo is an anonymous
function being used as a method?
2011 Mar 16
1
Standardized Pearson residuals (and score tests)
Hi Peter and others,
If it helps, I wrote a small function glm.scoretest() for the statmod
package on CRAN to compute score tests from glm fits. The score test for
adding a covariate, or any set of covariates, can be extracted very neatly
from the standard glm output, although you probably already know that.
Regards
Gordon
---------------------------------------------
Professor Gordon K
2005 Jul 27
2
R 2.1.1: read.table processes C-style escapes (PR#8037)
In R 2.1.1, the default behaviour of scan() was changed to process all
C-style escapes, even when a delimiter was specified using the 'sep'
argument. A new argument 'allowEscapes' was introduced to turn this
processing off.
Because read.table() calls scan(), read.table() inherits the new default
behaviour of scan() but without a way to turn it off. For example, reading
a file
2005 Apr 22
1
Infinite degrees of freedom for F-distribution
This is just a suggestion/wish that it would be nice for the F-distribution
functions to recognize limiting cases for infinite degrees of freedom, as
the t-distribution functions already do.
The t-distribution functions recognize that df=Inf is equivalent to the
standard normal distribution:
> pt(1,df=Inf)
[1] 0.8413447
> pnorm(1)
[1] 0.8413447
On the other hand, pf() will accept Inf
2003 May 24
2
Re: R-devel Digest, Vol 3, Issue 23
I am another person who has had trouble documenting S4 classes and
(particularly) methods. The methods package itself is pretty cool by the
way, but it is a pity that there are as yet no guidelines on S4 in the
"Writing R Extensions" document.
I have actually put together a guide on S4 documentation myself for the use
of my own lab which is at
2003 Jun 07
2
R CMD check: is it error to setMethod for class not currently defined?
Should R CMD check consider it an error to define a new method using
setMethod for a class which is not currently defined? It seems to me that
it would be best not to consider this an error.
What currently happens in that setMethod issues a warning, quite correctly.
This warning produces an object 'last.warning'. Then R CMD check issues a
WARNING that 'last.warning' is an
2003 May 24
2
Interpretation of escaped characters in \examples{}
I've noticed a curious interpretation of escaped characters in \examples{}
in .Rd files.
For example, if I type
files <- dir(pattern="\\.txt")
at the R prompt, I will get a vector containing all file names in the
current directory containing the string ".txt". If I put
\examples{ files <- dir(pattern="\\.txt") }
in an .Rd file of a package,
2005 Jul 22
0
boxplot() defaults {was "boxplot in extreme cases"}
>[Rd] boxplot() defaults {was "boxplot in extreme cases"}
>Martin Maechler maechler at stat.math.ethz.ch
>Mon Nov 8 10:36:42 CET 2004
>
> AndyL> Try:
>
> AndyL> x <- list(x1=rep(c(0,1,2),c(10,20,40)),
> x2=rep(c(0,1,2),c(10,40,20)))
> AndyL> boxplot(x, pars=list(medpch=20, medcex=3))
>
> AndyL> (Cf ?bxp, pointed to from
2016 Aug 05
1
Will there be 2016 issues of The R Journal?
The R Journal home page doesn't make any promises about how frequently the
journal will be published. Historically, though, there have been issues in
June and December of each year. The June issue has always appeared by this
time (6 August) in previous years.
Has there been a change in the publication schedule? Are there still plans
for a June 2016 issue?
Thanks
Gordon
2002 Jan 18
3
How do I know if the deviance of a glm fit was fixed?
I'm writing functions that need to behave differently for
GLMs like binomial and Poisson with fixed deviance, and those like
normal or gamma or quasi where the deviance is estimated from the
data. Given a glm object, is there a simple way to tell this
directly, or do I have to look at the name of the family?
Duncan Murdoch
2003 Apr 24
3
R TclTk Examples
Hi,
I've been learning how to use R TclTk in Windows over the last
few months.
I have recently put together a collection of examples of
some common widgets and their corresponding R code, at
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/
I would be interested in any feedback - Is it useful? Does it
contain any significant errors or bad coding style? Does anyone
else want to
2003 Feb 20
2
Who to decide what a generic function should look like?
I am not sure if what I am asking below should be discussed under r-help
or r-devel, so please feel free to move over to r-devel.
This is a spin off from Gordon Smyth's question about generic functions
and Robert Gentleman's reply. I have tried to raise the question before
and I am sure this has been discussed by others, but never on the r-help
list what I can see. My concern is that
2003 Feb 20
2
Who to decide what a generic function should look like?
I am not sure if what I am asking below should be discussed under r-help
or r-devel, so please feel free to move over to r-devel.
This is a spin off from Gordon Smyth's question about generic functions
and Robert Gentleman's reply. I have tried to raise the question before
and I am sure this has been discussed by others, but never on the r-help
list what I can see. My concern is that
2003 Mar 26
0
R TclTk iwidgets::comboboc
Hi,
I am trying to create a drop-down combobox in R TclTk.
The following works fine for a ListBox but fails for a combobox:
################# THIS WORKS FINE - CREATES AN EMPTY LISTBOX ##
tt<-tktoplevel()
win <- .Tk.subwin(tt)
.Tcl(paste("listbox",.Tk.ID(win),.Tcl.args()))
tkpack(win)
################## THIS FAILS - ATTEMPTS TO CREATE A COMBOBOX ##
tt<-tktoplevel()
win
2003 Apr 23
1
iwidgets in tcltk in R 1.7.0
Hi,
I have successfully installed R 1.7.0 and ActiveTcl 8.4.2.0 in
Windows 2000. Yes, I know that Tcl is already bundled with
R 1.7.0, but I want to use the iwidgets package to create a
drop-down listbox, and I don't think iwidgets is included in the
bundled R 1.7.0/TclTk installation package. I have set the
environment variables TCL_LIBRARY and MY_TCLTK to the directory
where I
2003 Mar 27
0
R TclTk iwidgets::combobox
Thanks Peter,
I've started a new R session (in Windows) and managed to get
both ways working now :
### THIS WORKS !!! ###
library(tcltk)
tclRequire("IWidgets")
tt<-tktoplevel()
combo <- tkwidget(tt,"iwidgets::combobox")
tkpack(combo)
### AND THIS WORKS TOO !!! ###
tt<-tktoplevel()
win <- .Tk.subwin(tt)
2020 Apr 28
2
mclapply returns NULLs on MacOS when running GAM
Dear R-devel,
I am experiencing issues with running GAM models using mclapply, it fails to return any values if the data input becomes large. For example here the code runs fine with a df of 100 rows, but fails at 1000.
library(mgcv)
library(parallel)
> df <- data.frame(
+ x = 1:100,
+ y = 1:100
+ )
>
> mclapply(1:2, function(i, df) {
+ fit <- gam(y ~ s(x, bs =
2010 Aug 20
3
Deviance Residuals
Dear all,
I am running a logistic regression and this is the output:
glm(formula = educationUniv ~ brncntr, family = binomial)
Deviance Residuals:
Min 1Q Median 3Q Max # ???? ????? ?? ????????
-0.8825 -0.7684 -0.7684 1.5044 1.6516
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.06869 0.01155 -92.487 <2e-16 ***
brncntrNo