[R] S4, polymorphism, and parallelization

2012-09-17 Thread Fernando Saldanha
(object) { # Some code here } ) Obviously this goes against the idea of polymorphism. How can I solve this problem? Thanks for any help. Fernando Saldanha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Normal cdf modified function

2009-02-17 Thread Fernando Saldanha
I wonder if an R package would have a function that calculates the following. Let Y be a normal multivariate function. For example, let Y have 4 dimensions. I want to calculate P(Y1 Z1, Y2 Z2, Y3 Z3, Y4 Z4). There are R functions to do the calculation if all the inequalities are of the type

[R] base:::rbind

2008-11-26 Thread Fernando Saldanha
It seems that after loading the package timeSeries the function base:::rbind is replaced by methods:::rbind identical(base:::rbind, methods:::rbind) [1] FALSE rbb = base:::rbind library(timeSeries) Loading required package: timeDate identical(base:::rbind, methods:::rbind) [1] TRUE

[R] system.time()

2008-04-26 Thread Fernando Saldanha
I thought system.time() would return three numbers, the first two adding up to the third one. However, this does not hold in my system running Windows Vista Home Premium, with an Intel Core 2 Duo processor. For example, using the code in the help for system.time() (with one zero added), I got:

[R] Geting names of variables

2008-03-22 Thread Fernando Saldanha
I wanted to create a list with the names of variables and their values. So I wrote the following function. add.to.list.names.vars.1 - function(lnv, vnv) { i - 1 while (i length(vnv)) { z - as.character(eval(substitute(quote(vnv[i+1])))[[2]][[i + 2]]) lnv[[vnv[i]]] - list(Name = z,

[R] Rprofile.site not executed?

2008-01-16 Thread Fernando Saldanha
It seems that my Rprofile.site file is not executed when I start R. To test this I included the following code in that file: .First - function(){ cat(\nWelcome at, date(), \n) flush.console() } When I start R the message above is not displayed. I am running R 2.6.1 (rgui.exe) under Vista

[R] Fwd: source('clipboard')

2007-12-03 Thread Fernando Saldanha
In the code below the first source command works fine, but the second does not, as can be seen from the error message. Is there a way to have the second command work? I am using R 2.6.1 on Windows Vista. (The command that is in the clipboard is just x - 3) source(clipboard, echo = F)