[R] How fast is the JSS reviewing process?

2014-01-14 Thread Christophe Genolini
Hi all, I thought I read somewhere that the reviewing process of the Journal of Statistical Software was quite fast (arround 3 month). Is that correct? -- Christophe Genolini Maître de conférences en bio-statistique Vice président Communication interne et animation du campus Université Paris

[R] microbenchmark

2013-09-16 Thread Christophe Genolini
[,2], that is for(i in 1:1000)microbenchmark(...times=1) So why is there such a bid difference? What is the correct execution time for my instruction? Christophe -- Christophe Genolini Maître de conférences en bio-statistique Vice président Communication interne et animation du campus Université

Re: [R] Add axes to a 3D scene (afer makeTriangles)

2013-01-30 Thread Christophe Genolini
/questions/8204972/carscatter3d-in-r-labeling-axis-better/8206320#8206320 -- Christophe Genolini Maître de conférences en bio-statistique Vice président Communication interne et animation du campus Université Paris Ouest Nanterre La Défense __ R-help@r

[R] Is it possible to be sponsored by R?

2012-11-19 Thread Christophe Genolini
think I can ask to the R fondation? Sincerely Christophe -- Christophe Genolini Maître de conférences en bio-statistique Vice président Communication interne et animation du campus Université Paris Ouest Nanterre La Défense [[alternative HTML version deleted

[R] exporting 3D dynamic graph

2012-11-05 Thread Christophe Genolini
Hi the list, Using misc3d, we can export 3d dynamic graph in pdf format. Is it also possible to export these graph into a format that we can publish on the web? Christophe -- Christophe Genolini Maître de conférences en bio-statistique Vice président Communication interne et animation du

Re: [R] exporting 3D dynamic graph

2012-11-05 Thread Christophe Genolini
Perfect, thanks a lot ! On 11/5/2012 8:23 AM, Christophe Genolini wrote: Hi the list, Using misc3d, we can export 3d dynamic graph in pdf format. Is it also possible to export these graph into a format that we can publish on the web? Christophe You don't provide enough information

[R] r-help or r-devel ?

2012-11-05 Thread Christophe Genolini
Hi the list, I have some basic questions about writing a package. On which list shall I post them? Theoretically, I am supposed to post them on r-devel, but all the questions on this list are very advance questions, not basic ones... So I don't know what to do. Christophe -- Christophe

Re: [R] Problem with a submission to jss

2012-10-15 Thread Christophe Genolini
Le 14/10/2012 00:00, Duncan Murdoch a écrit : On 12-10-13 3:20 PM, Christophe Genolini wrote: Hi the list, I am about to submit an article describing an R package to the Journal of Statistical Software but I encounter a strange behavior of LaTeX: the numbering of the figure is correct (1. 2

[R] Petit traité de programmation orienté obje t sous R

2010-10-05 Thread Christophe Genolini
for the 2010 academic year? Try S4 ! Christophe -- - Christophe Genolini Maitre de conférences INSERM U669, Equipe Biostatistiques UFR STAPS, Université de Paris Ouest-Nanterre-La Défense Web: http:\\christophe.genolini.free.fr

Re: [R] Exporting an rgl graph

2010-04-20 Thread Christophe Genolini
Thanks a lot Both Asymptote and MeshLab work fine. Thanks for this article, Luke. On my particular case, I need to export lines (1D object in a 3D space) and not surfaces (2D objects). Is it possible to draw lines with misc3d ? Christophe Genolini Luke Tierney a écrit : The current issue

[R] Drawing a line with misc3d

2010-04-19 Thread Christophe Genolini
Hi the list, I would like to draw some lines with misc3d. I find a lot of tools to draw surfaces, but nothing for simple line... Is it possible? Note that I know that it is possible to draw lines with rgl (using lines3d), but I need to do it with misc3d to export the drawing in .asy format.

[R] S4: Multiple inheritance

2010-03-23 Thread Christophe Genolini
Hi all, Working with S4 object, I definine two class foo1 and foo2. I define '[' (resp. '[-') for the two classes. Then I define a third class foo3 that inherit from both foo1 and foo2. Is there a way to make '[' (resp. '[-') for foo3 inherit from '[' (resp. '[-') for foo1 and foo2? Thanks

Re: [R] aggregate without removing empty subset

2010-03-16 Thread Christophe Genolini
) ## Perfect (dim=c(3,3,2)) apply(m2, c(2,3), tapply, part2, mean) ## dim=c(3,2) Christophe Try this: apply(m, 2, tapply, part, mean) On Mon, Mar 15, 2010 at 2:10 PM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, As it is say in its doc, the aggregate function remove empty

[R] aggregate without removing empty subset

2010-03-15 Thread Christophe Genolini
Hi the list, As it is say in its doc, the aggregate function remove empty subsets. Is it possible to NOT remove empty subset ? --- 8 --- m - matrix(1:12,4) part - factor(c(A,B,A,B),levels=c(A,B,C)) aggregate(m,list(part),mean) ### I get: # Group.1 V1 V2 V3 # 1 A 2 6 10 # 2

[R] Dealing with an argument missing in ...

2010-03-10 Thread Christophe Genolini
Hi the list I define a S3 function that can have a various number of argument using '...' When some arguments are missing, I would like to give them some default value: func.numeric - function(x,...){ if(missing(y)){y-3} } But it does not works... I precise that I can not put 'y'

[R] [R-pkgs] KmL 1.1.1

2010-03-04 Thread Christophe Genolini
three different ways to define the starting conditions - Correction of minor bugs Christophe Genolini ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages __ R

Re: [R] Optimizing C code

2010-01-23 Thread Christophe Genolini
Duncan Murdoch a écrit : On 22/01/2010 12:52 PM, Christophe Genolini wrote: Thanks both of you. Inf - Inf [1] NaN So isn't the line 9 useless ? If either x[i] or y[i] are NA, then dev will be NA and !ISNAN(dev) will detect it... Sothe loop cool be 8.for(i = 0 ; i taille ; i++) { 10

[R] matrix to a C function

2010-01-23 Thread Christophe Genolini
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i *nbLigne ; i++){ 4. for(j=0

[R] Optimizing C code

2010-01-22 Thread Christophe Genolini
Hi the list, I need to write some efficient distances function, so I read the code for the Euclidean distance. I do not understand the purpose of the line 11 : if x[i] and y[i] are not NA (line 9), can dev be NA ? Christophe #define both_FINITE(a,b) (R_FINITE(a) R_FINITE(b)) #define

Re: [R] Optimizing C code

2010-01-22 Thread Christophe Genolini
Thanks both of you. Inf - Inf [1] NaN So isn't the line 9 useless ? If either x[i] or y[i] are NA, then dev will be NA and !ISNAN(dev) will detect it... Sothe loop cool be 8.for(i = 0 ; i taille ; i++) { 10.dev = (x[i] - y[i]); 11.if(!ISNAN(dev)) { 12. dist +=

[R] Number of download.

2010-01-19 Thread Christophe Genolini
Hi the list Is there a way to know how many times an R package (on CRAN) has been download ? Christophe __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Bug: more information on a crash

2010-01-08 Thread Christophe Genolini
Hi the list, In the package KmL (new version, not release yet), the main function seems to work correctly but once in a while, R crash (full crash, anything link with R is closed and windows ask if it can send a crash report). More precisely, when I run it in a loop on 1000 data sets, the

[R] savePlot for Mac and / or Linux?

2009-12-07 Thread Christophe Genolini
Hi all, In the package rtlu, I use the function savePlot. It is convenient since it let the user decide in which graphic format he wants his graph to be export. But when I run R CMD check, I get the following message : rtlu(V1,fileOutput=First.tex,textBefore=\\section{Variable 1 to

[R] Crash caused by a call to a C function

2009-06-18 Thread Christophe Genolini
Hi the list I write a function MyFunc. To optimize it, I write a C function MyFuncC then a function MyFunc2 that call .C(“MyFuncC”,….) The two functions MyFunc and MyFunc2 seem to behave exactly the same way (they give the same results). But when I test MyFunc2 several times (around 20), R

[R] Sending a function as an argument to C code.

2009-06-12 Thread Christophe Genolini
Hi the list, I am writing a function (myFunc) that is using an other function (let say distance). +++ dist1 - function(x,y)dist(rbind(x,y)) dist2 - function(x,y)y2 myFunc - function(x,distance){ cat(...\n) cat(distance(1,x)) } myFunc(x=3,distance=dist1)

[R] R CMD check does not find a mistake

2009-06-09 Thread Christophe Genolini
Hi the list, I build a package. They was a mistake in it, but R CMD check did not find it. Is that normal ? Here is what Kurt gets (which is right, I did this mistake): --- 8 * checking for code/documentation mismatches ... WARNING S4 class codoc mismatches from

Re: [R] time series, longitudinal data or trajectories

2009-06-06 Thread Christophe Genolini
at that, but is it the idea ? Christophe At 04:02 PM 6/5/2009, Christophe Genolini wrote: Hi the list Strictly speaking, this is not a R question, but I need the information for the creation of a package. My question is about vocabulary: What is the difference between time series, longitudinal data

[R] time series, longitudinal data or trajectories

2009-06-05 Thread Christophe Genolini
Hi the list Strictly speaking, this is not a R question, but I need the information for the creation of a package. My question is about vocabulary: What is the difference between time series, longitudinal data and trajectories? Sincerely Christophe

[R] Sweave: Changing the background color, adding a border

2009-04-19 Thread Christophe Genolini
Hi all, I am using Sweave to produce a document. Unfortunately, I have to print several copies and I can't print them in color. So I would like to change the way of printing the code. I would like to print the code in a box with a black borderline and a grey background (quite classic). Is it

Re: [R] Sweave: Changing the background color, adding a border

2009-04-19 Thread Christophe Genolini
Duncan Murdoch a écrit : On 19/04/2009 6:03 AM, Christophe Genolini wrote: Hi all, I am using Sweave to produce a document. Unfortunately, I have to print several copies and I can't print them in color. So I would like to change the way of printing the code. I would like to print the code

[R] Redefining [ using next method

2009-03-20 Thread Christophe Genolini
Hi all, I would like to use an object and to add some definition to the [ function, but I do not manage... My objet is a trajectories, a matrix whose columne name does contain information : - trajectories - function(traj,varName,time){ colnames(traj) - paste(varName,time,sep=)

Re: [R] probleme with savePlot (to eps)

2009-03-02 Thread Christophe Genolini
of getting the user choice of screen displayed graphics to an output file? -- David Winsemius On Mar 1, 2009, at 6:02 PM, Christophe Genolini wrote: Thanks for your answer. Use the postscript device to save .ps or .eps files. Unfortunatly, I can't. I am using savePlot in a package. Several

[R] probleme with savePlot (to eps)

2009-03-01 Thread Christophe Genolini
Hi the list, I used savePlot to export some eps graph but it seems that the graph file hold a bug. I include the graph.eps in a LaTeX file. Running latex is ok. But the dvi file contain some mistake, the graph overprint on some text and hide it. Then, when I try to convert it to another

Re: [R] probleme with savePlot (to eps)

2009-03-01 Thread Christophe Genolini
Thanks for your answer. Use the postscript device to save .ps or .eps files. Unfortunatly, I can't. I am using savePlot in a package. Several graphs (up to 100) are exported at the same time and I would like the user to chose the extension. It is why I need savePlot. Beside, I did not find

Re: [R] Strange behavior of savePlot

2009-02-26 Thread Christophe Genolini
Uwe Ligges a écrit : Christophe Genolini wrote: Hi all, I am using savePlot in a loop for saving several graph but I get some graph in 553x552, some other in 1920x1119. How comes ? My data are almost all the same (same label, same xlim / ylim, almost same data. Only the color changes). I

Re: [R] Strange behavior of savePlot

2009-02-26 Thread Christophe Genolini
Uwe Ligges a écrit : Christophe Genolini wrote: Uwe Ligges a écrit : Christophe Genolini wrote: Hi all, I am using savePlot in a loop for saving several graph but I get some graph in 553x552, some other in 1920x1119. How comes ? My data are almost all the same (same label, same xlim

[R] A (Not So) Short Introduction to S4 (ex Contributed Documentation)

2009-01-07 Thread Christophe Genolini
Here is the link : http://christophe.genolini.free.fr/webTutorial/index.php Any comments are welcome. Christophe On Tue, Jan 6, 2009 at 8:17 PM, Ben Bolker bol...@ufl.edu wrote: Christophe Genolini cgenolin at u-paris10.fr writes: Hi the list, I wrote a tutorial about S4

Re: [R] R-help Digest, Vol 71, Issue 7

2009-01-07 Thread Christophe Genolini
Thanks for your answer Here it is : http://christophe.genolini.free.fr/webTutorial/index.php Any comments are welcome... Christophe __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Contributed Documentation

2009-01-06 Thread Christophe Genolini
Hi the list, I wrote a tutorial about S4. Is it possible to have a link to it in the page Contributed Documentation or R Documentation on the CRAN web site ? Who shall I contact ? Christophe __ R-help@r-project.org mailing list

Re: [R] legend at fixed distance form the bottom

2008-12-08 Thread Christophe Genolini
. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Christophe Genolini Sent: Saturday, December 06, 2008 7:08 AM To: Greg Snow Cc: r-help@r-project.org Subject

Re: [R] legend at fixed distance form the bottom

2008-12-08 Thread Christophe Genolini
PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Christophe Genolini Sent: Monday, December 08, 2008 11:28 AM To: Greg Snow Cc: r-help@r-project.org Subject: Re: [R] legend at fixed distance form the bottom Sorry, I

Re: [R] legend at fixed distance form the bottom

2008-12-06 Thread Christophe Genolini
PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Christophe Genolini Sent: Friday, December 05, 2008 6:40 AM To: r-help@r-project.org Subject: [R] legend at fixed distance form the bottom Hi the list I would like

Re: [R] legend at fixed distance form the bottom

2008-12-06 Thread Christophe Genolini
, mule), inset = c(0,1.1), horiz = TRUE, xpd = NA) On Fri, Dec 5, 2008 at 8:39 AM, Christophe Genolini [EMAIL PROTECTED] wrote: Hi the list I would like to add a legend under a graph but at a fixed distance from the graphe. Is it possible ? More precisely, here is my code : --- 8 symboles

Re: [R] legend at fixed distance form the bottom

2008-12-06 Thread Christophe Genolini
Lol. To me, a fixed amount that depends on the size of the graph is not much fixed... --- 8 --- symboles - c(3,4,5,6) dn - rbind(matrix(rnorm(20),,5),matrix(rnorm(20,2),,5)) listSymboles - rep(symboles,each=2) layout(matrix(c(1,1,1,2,2,3),3)) for(i in 1:3){ plot(dn) legend(top, pch =

[R] legend at fixed distance form the bottom

2008-12-05 Thread Christophe Genolini
Hi the list I would like to add a legend under a graph but at a fixed distance from the graphe. Is it possible ? More precisely, here is my code : --- 8 symboles - c(3,4,5,6) dn - rbind(matrix(rnorm(20),,5),matrix(rnorm(20,2),,5)) listSymboles - rep(symboles,each=2)

[R] path and R CMD check

2008-07-23 Thread Christophe Genolini
Hi the list, When I developpe my code, I put the file that define all the functions in ./MyPack/R/prog.R and the tests in ./MyPack/tests/testsProg.R The test files start by load(../data/myData.rda) source(../R/prog.R) #test function number one... But R CMD check MyPack does not find the file

Re: [R] Sweave add code \201

2008-07-20 Thread Christophe Genolini
Peter Dalgaard a écrit : Christophe Genolini wrote: Hi the list, I do not understand what change in my configuration, but Sweave add the code \201 before each special characters é è à ç ... Does someone know when it come from ? MULE (multilingal environment) in Emacs used to be prone to do

[R] Sweave add code \201

2008-07-19 Thread Christophe Genolini
Hi the list, I do not understand what change in my configuration, but Sweave add the code \201 before each special characters é è à ç ... Does someone know when it come from ? Thanks Christophe __ R-help@r-project.org mailing list

Re: [R] probleme with R CMD check

2008-07-18 Thread Christophe Genolini
- data.frame(age=c(1,2,4,8,12)) save(dn,file=dn.Rda) --- 8 --- DESCRIPTION - Package:packClassic Type: Package Title: A (Not So) Short Introduction To S4 Version: 1.0 Date: 2008-07-16 Author: Christophe Genolini Maintainer: [EMAIL PROTECTED] Description: This package is a toy

Re: [R] R logo

2008-07-16 Thread Christophe Genolini
If we knew an elegant one, we'd have an R function to do it ... The R Logo was done manually (using software) in several phases IIRC. But yes, indeed, an 'Rfont' package on CRAN would be neat... Martin Maechler, ETH Zurich and R Core Team. I am not sur of what would be neat : a police

[R] R logo

2008-07-15 Thread Christophe Genolini
Hi the list, I like the R logo (grey C and blue R) very much, specialy the drawing of the letter with border and shadow. I would like to make something closed with some other letters. Does anyone know how to get a similar result ? Christophe __

[R] A (not so) Short Introduction to S4

2008-07-12 Thread Christophe Genolini
Hi the list, After months of keen work (!), thousands of questions on the R-help (and on the French R forum GuR), I am pleased to announce the birth of new a tutorial on S4: *** A (Not So) short Introduction to S4 *** http://christophe.genolini.free.fr/webTutorial/index.html It

Re: [R] package under unix

2008-06-15 Thread Christophe Genolini
Generally, I like to use a pdf device which can have any number of pages. I am proposing a graphical way a selecting a clusterization based a quality criterion. In order to avoid local maximum, you can build something like 10 000 clusterization. Exporting all of them has no sence. So I open

[R] cls.attrib and integer

2008-04-10 Thread Christophe Genolini
Hi the list, Is it a bug? The function cls.attrib seems to not work with integer : values - round(runif(50,1,10)) dim(values) - c(10,5) valuesBis - as.integer(values) dim(valuesBis) - c(10,5) cluster - rep(1:2,5) library(clv) cls.attrib(values,cluster) cls.attrib(valuesBis,cluster) Christophe

Re: [R] findGlobals on apply

2008-04-08 Thread Christophe Genolini
, Christophe Genolini wrote: f - function(x){apply(x,2,mean)} findGlobals(f) mean is a global variable, so findGlobals gets it right. That sound strange to me: a variable is something that vary... mean does not vary. maen will ge an argument that is a line of x and will make some calculous

[R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
Hi the list, Considere the following: f - function(x){apply(x,2,mean)} findGlobals(f) findGlobals consideres mean as a global variable, which it is not. Is there a way to tell to findGlobals that mean is a function ? Thanks Christophe __

Re: [R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
f - function(x){apply(x,2,mean)} findGlobals(f) mean is a global variable, so findGlobals gets it right. That sound strange to me: a variable is something that vary... mean does not vary. maen will ge an argument that is a line of x and will make some calculous on it, that is the

[R] Journal for R

2008-03-30 Thread Christophe Genolini
Hi the list I made up a new statistical procedure. I will publish it in a medical journal, but there will be only the way of using it, no calculation or algorithme detail. So is there a journal (I mean scientific journal) with selection commity to submit an article describing the detail of a

[R] tests Rin Rout

2008-03-30 Thread Christophe Genolini
Hi the list, Some rumour (!) say that is it possible to prepare some tests for checking our code using .Rin and .Rout. It seems to be a very good practice, but I did not manage to find information on it. So does someone know how it works ? What are we suppose to write in Rin ? More precisely :

Re: [R] tests Rin Rout

2008-03-30 Thread Christophe Genolini
See the paragraph in Writing R Extensions which explains this Well, I saw it again and again (before asking on the r-help) but I do not understand. Same for the Kurt Hornik slides on the web. Create tests/myPack.R with those lines in it plus lines to actually run the code. Does it mean

[R] S4 : the list of all the object

2008-03-29 Thread Christophe Genolini
Hi the list, Is it possible to get the list of all the S4 user define classes? I would like to set up a package.skeleton.S4 but for that, I need the list of the classes... Thanks Christophe __ R-help@r-project.org mailing list

[R] Sweave and printing error

2008-03-25 Thread Christophe Genolini
Hi the list. I am writing a tutorial for my student using LaTeX and sweave. I include some example that work (obiously) but I would also like to include some example that do NOT work (for pedagogie)... Is it possible ? At this point, I find that : - if there is a error in the code, Sweave

[R] S4 : dumpMethod

2008-03-18 Thread Christophe Genolini
Hi the list, I almost finished the green book (chapter 7 and 8 on S4), this is probably one of my last question :-) I hope you will not miss them to much ! Here is my today nighmare: I do not manage to use dumpMethod : setClass(A,representation(a=numeric))

Re: [R] setAs vs setIs

2008-03-17 Thread Christophe Genolini
I works, great ! So using your code, we can define 'as','as-' and 'is' with setIt. Is there still any interest using setAs ? Christophe It seems to me your problem here is simply that you did not define a coerce cal in setIs, so it does not know how to turn a C object into a B object,

[R] setAs vs setIs

2008-03-16 Thread Christophe Genolini
Hi the list I am fighting with the twins setAs and setIs... Here are some questions and comments (comments to myself but that migth be wrong, it is why I am posting them) 1. Very surprising : using setIs define 'is', 'as-' but not 'as' ??? 2. Using setAs define 'as', 'as-' but not 'is'... What

[R] changing the quote

2008-03-15 Thread Christophe Genolini
Hi the list, I am using R2.6.2. I don't now why, the quote used in the output of 'new' seams not compatible with Sweave. Is there a way to change them ? Is it something link with R, or link with my computer configuration ? setClass(E,list(e=factor)) [1] E new(E) An object of class “E”

[R] empty array

2008-03-15 Thread Christophe Genolini
Hi the list Is it possible to create an empty matrix ? I do not mean an matrix with a single value that is NA (which is not empty) but a real empty one, with length=0. I do not understand why we have length(numeric()), length(factor()) and length(character()) to zero, and length(array()) to

Re: [R] empty array

2008-03-15 Thread Christophe Genolini
of type is an important point, so I need to use matrix where I shall use matrix, even if it is an empty one. Christophe --- Christophe Genolini [EMAIL PROTECTED] wrote: Hi the list Is it possible to create an empty matrix ? I do not mean an matrix with a single value that is NA (which

[R] length of S4

2008-03-15 Thread Christophe Genolini
Hi the list, With basic type, length gives the length of the vector Wtih list, length gives the number of item With S4 object, length gives...one. Even with an objet with empty slot. setClass(E,representation(e=numeric)) [1] E length(new(E)) [1] 1 setClass(E,representation(e=matrix)) [1] E

[R] alias for a class

2008-03-14 Thread Christophe Genolini
Hi the list Is it possible to give two names for a class ? One long name for using in programmation, and one short name for the quick and durty uses ? With function, we can do mcf - myCoolFunction - function(x) With class, I define clusterizedLongData, I want to use it with the full name

[R] Sealed for setGeneric

2008-03-13 Thread Christophe Genolini
Hi the list When two setGeneric occurs on the same function, the second erage the first and erase all the function previously define. Is it possible to prevent that ? Is it possible to declare a setGeneric that can not be erased later ? Something like the |sealed for setMethod...| || |Thanks|

Re: [R] Sealed for setGeneric

2008-03-13 Thread Christophe Genolini
an unusual strategy would be to use lockBinding to make the symbol associated with the generic unchangeable. This sounds nice, thanks. Why is it unusual ? Any side effect or just the practice? __ R-help@r-project.org mailing list

[R] Sweave and the prompt

2008-03-06 Thread Christophe Genolini
Hi the list I would also like to remove the prompt, in order to let the reader cut-and-paste from pdf to R. So I set the prompt to with options(prompt= ,continue= ) But it add an extrat space at the start of each line. I also try some code options(prompt=\a,continue=\a) After a big figth in

Re: [R] inheritence in S4

2008-03-05 Thread Christophe Genolini
Hi Martin I was not that much speaking about what we can do, but more about what we can't. We can't decide that object will be 'never empty', we have to allow empty oject, otherwise new(A) will not work and that will be problematic. So, at this point, I see : - it is necessary to allow the

Re: [R] inheritence in S4

2008-03-03 Thread Christophe Genolini
Thanks Martin Well it works except that as seems to not like the initialize method : the following code (that is the same than yours with some initialize for A B and C) does not compile. It seems that as(c,A) does not work if we definie a initialize for A... --- 8 -- setClass(A,

[R] tutorial on codetools

2008-02-28 Thread Christophe Genolini
Hi the list Is there any tutorial to learn codetools ? It seems to be a very interesting pacakge, but the help gives not that much detail, and there is not that much examples provided... Christophe __ R-help@r-project.org mailing list

Re: [R] Set without argument

2008-02-26 Thread Christophe Genolini
side effect that I do not see ? Christophe Christophe Genolini [EMAIL PROTECTED] writes: Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using - ? My object contain a numeric and a matrix. At some point, I would like

Re: [R] Standard method for S4 object

2008-02-24 Thread Christophe Genolini
/I think your question should be more relevant on Rdev./ ok, I will Personnally I would find stuff like names, $, $-, or [ useful as these are usual operation with S3 objects. Is it possible in S4 to define $- ? If there is a slot name 'a' in object 'B', I find (in S4 in 15 pages more or

[R] S4 : Signature

2008-02-24 Thread Christophe Genolini
Hi the list Is it possible to define a method with a signature that will have more argument than the generic method? For exemple, print has only one argument, plot has two, can I do something like : setMethod(print,signature=c(x=numeric,y=character),function(x,y,...) ..

[R] Hiding a function

2008-02-23 Thread Christophe Genolini
Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function : -- a - function(x){ b - function(y){y^2} d - function(y){y^3} b(x)+d(x)+2 } a(2)

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
Duncan Murdoch a écrit : On 23/02/2008 5:15 AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function

[R] Set without argument

2008-02-23 Thread Christophe Genolini
Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using - ? My object contain a numeric and a matrix. At some point, I would like to impute the missing value in the matrix. So I would like to use something like : -

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
the function names with a dot and then they are not listed by ls(), so this is kind of hiding. .a - function() TRUE ls() character(0) .a function() TRUE Personally i would not do this though. G. On Sat, Feb 23, 2008 at 11:58:57AM +0100, Christophe Genolini wrote

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
is available to by.data.frame but is not visible outside of by.data.frame . On Sat, Feb 23, 2008 at 6:09 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 23/02/2008 5:58 AM, Christophe Genolini wrote: Duncan Murdoch a écrit : On 23/02/2008 5:15 AM, Christophe Genolini wrote

[R] Standard method for S4 object

2008-02-23 Thread Christophe Genolini
Hi the list, I am defining a new class MyClass. Shortly, I will submit a package with it. Before, I would like to know if there is a kind of non official list of what method a new S4 object have. More precisely, personnaly, I use 'print', 'summary' and 'plot' a lot. So for my new class, I

Re: [R] Set without argument

2008-02-23 Thread Christophe Genolini
Thanks a lot The 'usual' way to write the above code is a - imputeMyObj(a) :-( I was hopping something like the use of the superassignator - inside imputeMyObj (I was hoping even if I did not find it myself)... To bad. But thanks for teaching me 'usual' pratice. It is something that

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function : -- a - function(x){ b - function(y){y^2} d

Re: [R] learning S4

2008-02-13 Thread Christophe Genolini
Robin Hankin a écrit : Christophe you might find the Brobdingnag package on CRAN helpful here. Yep, I read it and I find it very usefull. A question anyway: Is there a way to change a slot without using the - ? Instead of new(obj) [EMAIL PROTECTED] - 3 I would like to have new(obj)

Re: [R] Integer vs numeric

2008-01-29 Thread Christophe Genolini
x[c(2,4)] work as well Henrik Bengtsson a écrit : x[1:n] /H On Jan 29, 2008 5:07 AM, [EMAIL PROTECTED] wrote: Seems strange to me to define an operator relatively to a very special case. I have to admit that I do not use 1:1e7 every day :-) Wouldn't it be more appropriate to define

Re: [R] Integer vs numeric

2008-01-28 Thread Christophe Genolini
Further to the above: The help ?: says: Value: For numeric arguments [as opposed to factors], a numeric vector. This will be of type 'integer' if 'from' and 'to' are both integers and representable in the integer type, otherwise of type 'numeric' ??? This is very

[R] package manual in pdf

2008-01-23 Thread christophe . genolini
Hi all, I am trying to write a pdf manual for my package. I create a file inst\doc\myDoc.tex. I taught that R CMD build will call latex on this file (like it is said in Writing R extension), but it does not happen. I also notice that a pdf manual is produce automatically but with a not so good

[R] [R-pkgs] New package: R to LaTeX Univariate Analyses

2008-01-21 Thread Christophe Genolini
this package to HTML. I will not have time to do it alone. So if some people are interested, two other project are almost open : - R to LaTeX Bivaraite Analysis - R to HTML Univariate Analysis Thanks Christophe Genolini Junior statistician PSIGIAM: Paris Sud Innovation Group in Adolescent Mental

[R] bug in mmlcr ?

2008-01-13 Thread Christophe Genolini
Hi the list. Is there a bug in mmlcr package ? The following code does not compile: mmlcrTest - function(dataW){ dataL - reshape(dataW,idvar=id,timevar=T,varying=list(paste(T,0:10,sep=)),direction=long,v.names=score) resultR - mmlcr(outer= ~ 1 | id, components =

[R] R to LaTeX Univariate Analysis

2007-12-31 Thread Christophe Genolini
Hi all Well, first: happy new year... Second: I write a function in R that might interest some other people. On the other hand, I am closer to beginners than experts; I don't know how valuable my code is. I don't know how long it will take to me to create a library and I don't know if it's

[R] Rerolling k-means

2007-12-10 Thread Christophe Genolini
Hi all I am working on k-means algorithm (in R: kmeans( ) ). The R-help advice us to try several random start in order to avoid local minimum. Does one know if there is a procedure that automaticly run this rerolling and select the best partition ? Or any studies that gives clues on the

[R] Oriented object programming

2007-12-09 Thread Christophe Genolini
Hi all Two questions: - I would like to learn more on oriented object programming with R. Is there any tutorial for that? - Without waking up a troll, I am not very familiar with diffusion list, I am more use to forum. On a diffusion list, how can I check if someone already asks a question?

[R] Clean programming with R

2007-11-22 Thread Christophe Genolini
Hi all Is there any compiler for R ? By compiler, I mean something that check the cleanliness of the code : if we declare all the variables we use, if we don't use external variable from a function and so on... For exemple, something that will ring a bell on the following code (saying line 4 :