similar to: Who to decide what a generic function should look like?

Displaying 20 results from an estimated 10000 matches similar to: "Who to decide what a generic function should look like?"

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 23
0
unsubscribe
From:r-devel-admin@stat.math.ethz.ch on 02/22/2003 12:00 PM CET Sent by: r-devel-admin@stat.math.ethz.ch Please respond to r-devel@stat.math.ethz.ch To: r-devel@stat.math.ethz.ch cc: (bcc: Asheka Rahman/arahma1/LSU) Subject: R-devel digest, Vol 1 #101 - 10 msgs Send R-devel mailing list submissions to r-devel@stat.math.ethz.ch To subscribe or unsubscribe via the World Wide Web,
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
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
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
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
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,
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
2002 Oct 13
1
The class attribute on an environment seems buggy (PR#2159)
Full_Name: Henrik Bengtsson Version: 1.6.0, 1.5.1 OS: WinXP Pro Submission from: (NULL) (128.250.252.82) The following example, which I tested on both R v1.5.1 and R v1.6.0 on WinXP Pro, shows the problem I encountered when trying to use the class attribute of an environment: # Define method print() for class Environment C print(e) # gives: # [1] "An Environment!" # Exit [R]
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
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
2002 Nov 13
0
How call method of root "class" directly?
Is there a way of calling the method of the root class directly? Here is an example explaing my question. Everything relates to S3/UseMethod classes and methods. I have an object x of class MicroarrayMatrix, which inherits from class Matrix. The "core" object of x is a simple matrix. In other words, I basically have x <- matrix(logratios, ncol=nbrOfSpots, nrow=nbrOfSlides)
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)
2002 Nov 11
1
library() - Error: Package foo was built for Win32
>From R v1.6.0 there has been a new test added to the library() code. This test is performed when library() is ran on a "unix" system and it verifies that the "Built" platform (from the DESCRIPTION file) is "compatible" with the current platform. Here is the code extract from the local function testRversion() of library() that I am talking about: if
2020 Apr 28
0
mclapply returns NULLs on MacOS when running GAM
Hi, a few comments below. First, from my experience and troubleshooting similar reports from others, a returned NULL from parallel::mclapply() is often because the corresponding child process crashed/died. However, when this happens you should see a warning, e.g. > y <- parallel::mclapply(1:2, FUN = function(x) if (x == 2) quit("no") else x) Warning message: In
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
2020 Apr 29
0
mclapply returns NULLs on MacOS when running GAM
Do NOT use mcparallel() in packages except as a non-default option that user can set for the reasons Henrik explained. Multicore is intended for HPC applications that need to use many cores for computing-heavy jobs, but it does not play well with RStudio and more importantly you don't know the resource available so only the user can tell you when it's safe to use. Multi-core machines are
2003 Jan 28
1
Name spaces and behavior of overloaded functions?
First of all, I haven't followed the discussion about the new/upcoming name space support in R so I do not know the purposes or requirements for it, neither its design, and I can only guess. I found the (initial?) notes by Luke Tierney on the Developers Page. Are there any other references? Since it seems that the current implementation (R v1.6.2) of name spaces is a "trial" version