[R] locked environment and inheritance

2007-06-04 Thread johan Faux
Hi, I have a S3 package with namespace called myS3Pkg. Inside my package I would like to create a S4 class which extends (adds 2 slots) another S4 class from some other package. The class should be created in myPkg environment (and not global environment). Using: setClass(myS4class,

Re: [R] locked environment and inheritance

2007-06-04 Thread johan Faux
PROTECTED] To: johan Faux [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Monday, June 4, 2007 2:40:21 PM Subject: Re: [R] locked environment and inheritance johan Faux [EMAIL PROTECTED] writes: Hi, I have a S3 package with namespace called myS3Pkg. Inside my package I would like

[R] do not eval vignettes during R CMD build

2007-05-28 Thread johan Faux
Hi, I was not able to find a way such that R CMD build run Sweave with eval=FALSE. I have a package where I want the R code in the vignettes to run only during R CMD check but not on R CMD build. Is there any way to achieve this ? thank you.

[R] run a script during R CMD build

2007-03-20 Thread johan Faux
I would like R CMD build to run some R code which does some stuff and save the result as a file in /inst/docs folder. Is there any way of doing this. Thank you. Johan We won't tell. Get more on shows you

Re: [R] run a script during R CMD build

2007-03-20 Thread johan Faux
mydata.RData in my package and I want it to be updated every time i build the package. I appreciate your help anyway. -Johan - Original Message From: Adaikalavan Ramasamy [EMAIL PROTECTED] To: johan Faux [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Tuesday, March 20, 2007 12:10:21

Re: [R] silent loading of packages

2007-02-02 Thread johan Faux
are in /tmp/RtmpYl8LZA/downloaded_packages Warning message: cannot create HTML package index in: tools:::unix.packages.html(.Library) Thank you again, -Johan - Original Message From: Prof Brian Ripley [EMAIL PROTECTED] To: johan Faux [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent

[R] silent loading of packages

2007-01-30 Thread johan Faux
I would like to turn off all the messages during library(aPackage) or require(aPackage) I tried different commands: invisible, capture.output, sink but none of them is working. For example, loading VGAM, gives a lot of unnecessary messages: library(VGAM) Attaching package: 'VGAM'

[R] unevaluated expression

2006-10-12 Thread johan Faux
Hello, x- something(a+b) + c is there any function F such that F(x) gives me the unevaluated value of x, i.e. something(a+b)+c I would appreciate any help on this thanks - [[alternative HTML version deleted]]

Re: [R] unevaluated expression

2006-10-12 Thread johan Faux
parse(text=x)[[1]] is what I wanted, thank you Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/12/2006 10:03 AM, johan Faux wrote: Hello, x- something(a+b) + c is there any function F such that F(x) gives me the unevaluated value of x, i.e. something(a+b)+c I would appreciate any

[R] dyn.load, dyn.unload -memory management

2006-07-28 Thread johan Faux
hello everybody, I have some code which looks like: dyn.load(lpSolve.so) res - lp(some.parameters) and everything runs fine. What lp() does, it's just calling a C function which is in lpSolve.so If I call lp() a large number of times: for(1 in 1:5000){ gc(verbose=TRUE) res -

Re: [R] unique, but keep LAST occurence

2006-07-24 Thread johan Faux
I have a question about deparse function in R What is the reason that deparse use an argument like width.cutoff ? Why the maximum cutoff is 500? I was manipulating an R formula and used deparse. Since the length of user's formula was greater then 500, my code didnt work. thanks Johan

[R] deparse - width.cutoff

2006-07-24 Thread johan Faux
I have a question about deparse function in R What is the reason that deparse use an argument like width.cutoff ? Why the maximum cutoff is 500? I was manipulating an R formula and used deparse. Since the length of user's formula was greater then 500, my code didnt work. thanks Johan johan

[R] How can I pass a R matrix as parameter to C code?

2006-03-20 Thread johan Faux
Hello, Is it possible to pass R matrix as a parameter to an internal C procedure? From the documentation I got the impression that only 1-dim vectors can be passed. Why the following wont work for me? a-matrix(1:15,3,5) .C(pr,as.integer(a)) void pr(int **a){

[R] how to automatically install old versions of packages ..

2006-02-27 Thread johan Faux
Hello, I need some help on how to create a script which will automatically install an *particular* version of a package from a CRAN-style repository. All the functions available for installing/updating packages would try to install the newest version of the package. Thus, what i need

[R] for loop should check the looping index !!

2006-01-13 Thread johan Faux
Hello , a-c(1) for(i in 2:length(a)) do.something with a[[i]] I get : Error in a[[i]] : subscript out of bounds Am I missing something here? Doesnt R check the value of i inside for and if the condition is not tru, dont do anything thanks, johan

[R] what's the best way to save global variables?

2005-09-15 Thread johan Faux
I am writing a kind of long program in R and I have some variables which I want to be globals. Where should I save them? I was thinking to create a function wich initialize all the global variables and then whenever I need them, I call this function. What if I create a file glob.R with