Re: [R] Reversing axis in a log plot

2005-05-20 Thread Petr Pikal
Hi Christian I did not see any response to your question yet, and my will not be very helpful. The error message comes from axis building, plot itself seems to be OK. If you choose slightly bigger value for ylim it will go through without any complain. plot(x,y, log = y, ylim = c(30,1.2))

Re: [R] R annoyances

2005-05-20 Thread Uwe Ligges
Dear John, I have not expected to cause that many traffic and largish discussion. What I tried to point out is that: - a programmer should know that one has to use TRUE / FALSE in code in order to make it work generaly which is also checked by R CMD check. - a user simply typing some lines in

[R] survival probabilities from survival tree (rpart)

2005-05-20 Thread Luka Kos
Hi! How to compute probabilities of survival from rpart object? Consider the following example: library(rpart) survtree - rpart(Surv(time,status)~., data=aml) This code will produce the following survival tree: 1) root 23 26.44184 1.000 2) x=Maintained 11 12.61182 0.6848303 * 3)

Re: [R] R 2.1.0 RH Linux Built from Source Segmentation Fault

2005-05-20 Thread Peter Dalgaard
Bruce Foster [EMAIL PROTECTED] writes: ... The machines are AMD Athlon MP 2400+ with 2 GB RAM, dual CPUs, and lots of free disk space. Any per-user/per-process limits? Resource usage look suspiciously close to 256M. If your install is allowing overcommitment of memory, the OS can kill

[R] Re: predict nlme syntax

2005-05-20 Thread Petr Pikal
Thank you. I somehow missed your answer and find it only after I went through archives. I had to have partial blindfoldness when searching in your book and in documentation for the answer. Best regards Petr Pikal On 10 May 2005 at 13:24, r-help@stat.math.ethz.ch wrote: Dear all Please

[R] hello

2005-05-20 Thread Navarre Sabine
I would like to donc an AFC (factoriel correspondance analysis) and I know that on Splus, the function to do that is afc(data). But on R??? is it acm? That a lot! Sabine - ils, photos et vidéos ! [[alternative HTML version deleted]]

Re: [R] hello

2005-05-20 Thread Suresh Krishna
http://snipurl.com/f0xh (leads you to packages 'ade4' and 'MASS') -s. Navarre Sabine wrote: I would like to donc an AFC (factoriel correspondance analysis) and I know that on Splus, the function to do that is afc(data). But on R??? is it acm? That a lot! Sabine

Re: [R] laten class analysis

2005-05-20 Thread simone gabbriellini
my help.search didn't give me any result :( the one you suggest should be right what I need thank you, simone Il giorno 20/mag/05, alle 00:33, Chuck Cleland ha scritto: help.search(latent class) shows lca() in the e1071 package. simone gabbriellini wrote: Dear List, just a little question, I am

[R] Why does this give a syntax error?

2005-05-20 Thread bry
Hi I'm generating the following in a file and getting a syntax error: bryansAtHeaderLevel -

[R] attached file with syntax error

2005-05-20 Thread bry
oops, I forgot to attach the example txt file with the syntax error, so I will do it here, can anyone see what the error is with bryansAtLineLevel? bryansAtHeaderLevel -

Re: [R] Simultaneous estimation of mean and garch eq'n

2005-05-20 Thread Patrick Burns
It is my experience that location parameters are not very affected by the garch parameters. So doing a naive estimate of location, followed by the garch estimate, followed by an estimate of location accounting for heteroskedasticity is likely to be indistinguishable from the estimates from the

Re: [R] R annoyances

2005-05-20 Thread Martin Maechler
TL == Thomas Lumley [EMAIL PROTECTED] on Thu, 19 May 2005 09:39:13 -0700 (PDT) writes: TL On Thu, 19 May 2005, Rod Montgomery wrote: Thomas Lumley wrote: This one is actually a FAQ, mtx[,1,drop=FALSE] -thomas I wonder whether there is, or should be, a way

Re: [R] R annoyances

2005-05-20 Thread Robin Hankin
On May 20, 2005, at 11:00 am, Jan T. Kim wrote: On Thu, May 19, 2005 at 03:10:53PM -0400, John Fox wrote: Since you can use variables named c, q, or t in any event, I don't see why the existence of functions with these names is much of an impediment. True, particularly since I'm not too likely to

RE: [R] laten class analysis

2005-05-20 Thread Liaw, Andy
You have to have the package installed for help.search() to find things in it. You could try RSiteSearch(latent class, restrict=function) Andy From: Simone gabbriellini my help.search didn't give me any result :( the one you suggest should be right what I need thank you, simone

RE: [R] attached file with syntax error

2005-05-20 Thread Eric Lecoutre
Well... You just can't end vector declaration with a comma... x - c(0,1,) Error: syntax error x - c(0,1) Eric Eric Lecoutre UCL / Institut de Statistique Voie du Roman Pays, 20 1348 Louvain-la-Neuve Belgium tel: (+32)(0)10473050 [EMAIL PROTECTED]

Re: [R] using src/Makevars file

2005-05-20 Thread Prof Brian Ripley
Why do you expect FF to specify a Fortran compiler when F77 works on the command line? I would expect F77 to work. On Thu, 19 May 2005, Joel Bremson wrote: Hi all, Thanks to all who offered advice on using F95 in R. Now I'm trying to compile a test package using gfortran, Linux 2.4.21 and R

[R] legend as a subtitle

2005-05-20 Thread Ravi . Vishnu
Very little space is available in one of my plots for the legend. I would like to lift it out of the main plot area and present it in the subtitle area. Would appreciate any help that I can get. Ravi Vishnu This message is meant for the addressee only and may contain confidential and

[R] Degradation model

2005-05-20 Thread Klaus Kaae Andersen
Dear list, I have a degradation model: dX/dt = * I(X2)*( k1*X(t) )/( X(t)+k2 ) where X(t) is concentration at time t, and k1 and k2 are parameters that I want to estimate. I(X) is a known inhibitor function. My questions is whether this is implemented or easily computed in any R package. I

[R] Plot Problem

2005-05-20 Thread Sebastian Schoenherr
Hi folks, I try to plot a variable which contains string-variables. it works, but the problem is that there are a lot of values at the x axis (up to 24) SO i have to scale or rotate the label at the x axis. I tried this with the text() function. It doesn't work correctly. Is there a simple way

[R] Lattice: it seems, a bug in draw.key function

2005-05-20 Thread Wladimir Eremeev
Dear r-help, Now I am drawing graphs with xyplot function. In order to place a legend under the plots I use the key argument in the xyplot function. One of the 'key' components is 'divide', which defines a number of points on the each line of the legend. The default is 3 points. I

Re: [R] attached file with syntax error

2005-05-20 Thread Barry Rowlingson
Eric Lecoutre wrote: Well... You just can't end vector declaration with a comma... x - c(0,1,) Error: syntax error x - c(0,1) You may not be able to, but I can! x=c(0,1,) x [1] 0 1 ( R 2.0.1 and R 1.8.1 ) I suspect the error is more to do with the length of the line overflowing a buffer, so

Re: [R] Plot Problem

2005-05-20 Thread Uwe Ligges
Sebastian Schoenherr wrote: Hi folks, I try to plot a variable which contains string-variables. it works, but the problem is that there are a lot of values at the x axis (up to 24) SO i have to scale or rotate the label at the x axis. I tried this with the text() function. It doesn't work

Re: [R] legend as a subtitle

2005-05-20 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Very little space is available in one of my plots for the legend. I would like to lift it out of the main plot area and present it in the subtitle area. Would appreciate any help that I can get. Look at the following code and read the corresponding help pages:

Re: [R] R annoyances

2005-05-20 Thread Gabor Grothendieck
On 5/20/05, Robin Hankin [EMAIL PROTECTED] wrote: On May 20, 2005, at 11:00 am, Jan T. Kim wrote: On Thu, May 19, 2005 at 03:10:53PM -0400, John Fox wrote: Since you can use variables named c, q, or t in any event, I don't see why the existence of functions with these names is much

Re: [R] Plot Problem

2005-05-20 Thread Romain Francois
Le 20.05.2005 13:20, Sebastian Schoenherr a écrit : Hi folks, I try to plot a variable which contains string-variables. it works, but the problem is that there are a lot of values at the x axis (up to 24) SO i have to scale or rotate the label at the x axis. I tried this with the text() function.

RE: [R] R annoyances

2005-05-20 Thread Liaw, Andy
From: Robin Hankin On May 20, 2005, at 11:00 am, Jan T. Kim wrote: On Thu, May 19, 2005 at 03:10:53PM -0400, John Fox wrote: Since you can use variables named c, q, or t in any event, I don't see why the existence of functions with these names is much of an impediment. True,

Re: [R] attached file with syntax error

2005-05-20 Thread Sundar Dorai-Raj
You can in R-2.1.0 Patched: c(1,) [1] 1 --sundar Eric Lecoutre wrote: Well... You just can't end vector declaration with a comma... x - c(0,1,) Error: syntax error x - c(0,1) Eric Eric Lecoutre UCL / Institut de Statistique Voie du Roman Pays, 20 1348 Louvain-la-Neuve Belgium tel:

RE: [R] attached file with syntax error

2005-05-20 Thread Ted Harding
On 20-May-05 Eric Lecoutre wrote: Well... You just can't end vector declaration with a comma... x - c(0,1,) Error: syntax error x - c(0,1) Eric Well, maybe some people can't achieve that, but I can: x-c(1,2,3,) x [1] 1 2 3 (on both R-1.8.0 and R-2.1.0beta) Best wishes to all,

Re: [R] R annoyances

2005-05-20 Thread Philippe Grosjean
Hello, Regarding use of parenthesis, it is true that R is much better with f(10) != f[10] != f[[10]], where Matlab is a little confusing. Also, in Matlab, you can use some functions without (), further adding to the confusion (the only example that comes to my mind in R is the use of '?' as

RE: [R] Power w/ unequal sample sizes

2005-05-20 Thread Bashir Saghir (Aztek Global)
It seems although your are trying to do a retrospective power calculation - not something to be encouraged. I don't think that power.t.test was designed to work on observed data in the way you seem to want to use it. You could use power.t.test to do a prospective calculation where you know the

RE: [R] R annoyances

2005-05-20 Thread Prof Brian Ripley
On Fri, 20 May 2005, bogdan romocea wrote: On 20-May-05 Uwe Ligges wrote: All possible changes to T/F (both removing the meaning of TRUE/FALSE in a clean session and making them reserved words) would break code of lots of users. Just wanted to point out that there's another (darker) side to this:

RE: [R] R annoyances

2005-05-20 Thread Liaw, Andy
From: Philippe Grosjean Hello, Regarding use of parenthesis, it is true that R is much better with f(10) != f[10] != f[[10]], where Matlab is a little confusing. Also, in Matlab, you can use some functions without (), further adding to the confusion (the only example that comes to my

Re: [R] attached file with syntax error

2005-05-20 Thread Peter Dalgaard
Sundar Dorai-Raj [EMAIL PROTECTED] writes: You can in R-2.1.0 Patched: c(1,) [1] 1 --sundar Eric Lecoutre wrote: Well... You just can't end vector declaration with a comma... x - c(0,1,) Error: syntax error x - c(0,1) I can in versions going back to 1.8.0 (did Eric

[R] R: looping

2005-05-20 Thread Clark Allan
hi all i have a simple question. code is displayed below. how can i use a vectorised command in order to do this (ie replace the loop)? (ie apply, lapply, sweep, etc) z-matrix(c(1:9),3,3) top-c(1.5,5.5,9) for (i in 1:3) z[z[,i]top[i]]-top[i]__

Re: [R] R annoyances

2005-05-20 Thread Barry Rowlingson
Liaw, Andy wrote: Don't give up to easily: If _ can be done away as assignment operator, I'd guess anything is fair game... Even my great dream that R and Python eventually merge into the same language? R gets Python's syntax and Object-oriented functions and Python gets access to all R's

Re: [R] R annoyances

2005-05-20 Thread Robin Hankin
On May 20, 2005, at 01:14 pm, Liaw, Andy wrote: [snip] R uses round brackets in two unrelated ways: 4*(1+2) --- using ( and ) to signify grouping f(8) function f() evaluated at 8. where there is no reason to use the same parenthesis symbol for both tasks. The same is done in

Re: [R] attached file with syntax error

2005-05-20 Thread Prof Brian Ripley
It might be worth pointing out that R is supposed to have a 1024 byte (not character) input buffer, and I did fix a few things related to that when internationalizing the parser (and also some about multi-byte pushbacks which I suspect is the issue here). It is still good practice to keep

Re: [R] Lattice: it seems, a bug in draw.key function

2005-05-20 Thread Deepayan Sarkar
On Friday 20 May 2005 07:05 am, Wladimir Eremeev wrote: Dear r-help, Now I am drawing graphs with xyplot function. In order to place a legend under the plots I use the key argument in the xyplot function. One of the 'key' components is 'divide', which defines a number of points on

Re: [R] Why does this give a syntax error?

2005-05-20 Thread Spencer Graves
Might it want bryansAtHeaderLevel - to be syntactically complete? Have you tried wrapping the entire sequence between { and }? hope this helps. [EMAIL PROTECTED] wrote: Hi I'm generating the following in a file and getting a syntax error: bryansAtHeaderLevel -

Re: [R] R annoyances

2005-05-20 Thread Ben Bolker
[snip snip snip snip] How about strict option that could be set to disallow use of T/F variables? I had a student run into trouble fairly recently (although can't at the moment provide a reproducible example using T as a variable in a formula that was passed to nls() ... I think there

Re: [R] R annoyances

2005-05-20 Thread Gabor Grothendieck
On 5/20/05, Barry Rowlingson [EMAIL PROTECTED] wrote: Liaw, Andy wrote: Don't give up to easily: If _ can be done away as assignment operator, I'd guess anything is fair game... Even my great dream that R and Python eventually merge into the same language? R gets Python's syntax and

Re: [R] Why does this give a syntax error?

2005-05-20 Thread Wladimir Eremeev
The statemets ends with '0,)', maybe this is the reason... BTW, all statements end with the similar symbols. I have found, that R some times complain on this and sometimes not, but did not search the reasons. My R 2.1.0 on win2000 doesn't complain on the statement bryansAtLineLevel-c(

[R] getting the unique values and counts from a vector

2005-05-20 Thread Ravi . Vishnu
Hi all, From a vector, I want to get the unique values and the counts of these unique values in the vector. For example, x-c(2 ,1 ,2, 1, 4 ,2 ,1, 4 ,1 ,1) xu-unique(x) xn-numeric(length(xu)) for (i in 1:length(xu)) {xn[i]-length(which(x==xu[i]))} There must be a very much simpler method of doing

Re: [R] R annoyances

2005-05-20 Thread Uwe Ligges
Ben Bolker wrote: [snip snip snip snip] How about strict option that could be set to disallow use of T/F variables? I had a student run into trouble fairly recently (although can't at the moment provide a reproducible example using T as a variable in a formula that was passed to nls() ... I

Re[2]: [R] Lattice: it seems, a bug in draw.key function

2005-05-20 Thread Wladimir Eremeev
Dear Deepayan, I suggest something like pointsGrob( x=if(key$divide1){(1:key$divide-1)/(key$divide-1)} else 0.5, [blah-blah-blah] ) This looks like your 3rd variant. However, I haven't try very hard to verify my solution. I tried to redefine the entire function

Re: [R] Lattice: it seems, a bug in draw.key function

2005-05-20 Thread Deepayan Sarkar
On Friday 20 May 2005 10:05 am, Wladimir Eremeev wrote: Dear Deepayan, I suggest something like pointsGrob( x=if(key$divide1){(1:key$divide-1)/(key$divide-1)} else 0.5, [blah-blah-blah] ) This looks like your 3rd variant. However, I haven't try very hard

[R] address of Gordon Smyth ?

2005-05-20 Thread SuzieBlatt
Anyone know where I can reach the author of the compareGrowthCurves function? I'm having trouble with it. Thanks, Suzie __ Switch to Netscape Internet Service. New! Netscape Toolbar for Internet Explorer Search from anywhere on

RE: [R] getting the unique values and counts from a vector

2005-05-20 Thread Ravi Varadhan
Hi, table should do it. x-c(2 ,1 ,2, 1, 4 ,2 ,1, 4 ,1 ,1) table(x) x 1 2 4 5 3 2 -- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins

Re: [R] getting the unique values and counts from a vector

2005-05-20 Thread Dimitris Rizopoulos
you could use table(), i.e., x - c(2, 1, 2, 1, 4, 2, 1, 4, 1, 1) ### tab - table(x) xu - as.numeric(names(tab)) xn - as.vector(tab) xu; xn I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

Re: [R] R annoyances

2005-05-20 Thread François Pinard
[Barry Rowlingson] Even my great dream that R and Python eventually merge into the same language? R gets Python's syntax and Object-oriented functions and Python gets access to all R's statistical functions? R is more than a statistical library. I'm coming to R with a strong Python

Re[2]: [R] Lattice: it seems, a bug in draw.key function

2005-05-20 Thread Wladimir Eremeev
DS Yes. It has to do with namespaces. Try ?assignInNamespace Thank you. It works. I have got the desired output (---o---). -- Best regards Wladimir Eremeev mailto:[EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

[R] constrained optimization

2005-05-20 Thread gael . robert
Hello, I've got to compute a minimization equation under an equality constraint (Min g(x1,x2,x3) with x1+x2=const). The Constroptim function does not authorize an equality condition but only inequality conditions. Which function can I use instead? Thank you very much for your help. Gael Robert -

Re: [R] address of Gordon Smyth ?

2005-05-20 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Anyone know where I can reach the author of the compareGrowthCurves function? Which package are we talking about? I guess statmod, but please indicate this! For sure you have tried the address (in CC) you can find in library(help=statmod) Uwe Ligges I'm having

Re: [R] getting the unique values and counts from a vector

2005-05-20 Thread Wladimir Eremeev
Dear Ravi, From a vector, I want to get the unique values and the counts of these unique values in the vector. For example, x-c(2,1,2,1,4,2,1,4,1,1) try hist(x,plot=FALSE,breask=unique(x))$counts [1] 5 3 0 0 0 2 -- Best regards Wladimir Eremeev mailto:[EMAIL

Re: [R] Why does this give a syntax error?

2005-05-20 Thread Wladimir Eremeev
Another reason could be, a too long line. -- Best regards Wladimir Eremeev mailto:[EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] address of Gordon Smyth ?

2005-05-20 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Anyone know where I can reach the author of the compareGrowthCurves function? I'm having trouble with it. Anything wrong with [EMAIL PROTECTED] (1st hit on Google)? -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics

Re: [R] constrained optimization

2005-05-20 Thread Arne Henningsen
On Friday 20 May 2005 17:32, [EMAIL PROTECTED] wrote: Hello, I've got to compute a minimization equation under an equality constraint (Min g(x1,x2,x3) with x1+x2=const). The Constroptim function does not authorize an equality condition but only inequality conditions. Which function can I use

Re: [R] R annoyances

2005-05-20 Thread bogdan romocea
Prof Ripley, I'm aware of R CMD check, but who uses it? Not many regular users, I presume. As long as T/F are allowed to stand for TRUE/FALSE without being reserved words, there will be users who will fall in the trap. As your example shows, some code would have to be manually converted.

[R] issues with identical()

2005-05-20 Thread Jean Eid
Hi all, hope you having a nice day, I ahve this weird results with identical (probably I am not understanding correctly what it does ...) I have these two data frames and I issue : identical(temp, temp1) [1] FALSE However, these data frames are Nx2 and when I issue: identical(temp[,2],

Re: [R] constrained optimization

2005-05-20 Thread Jean Eid
Why can't you just solve x1 in terms of x2 and plug it in.. ie. min g(const-x2, x2, x3) Jean On Fri, 20 May 2005 [EMAIL PROTECTED] wrote: Hello, I've got to compute a minimization equation under an equality constraint (Min g(x1,x2,x3) with x1+x2=const). The Constroptim function does not

Re: [R] getting the unique values and counts from a vector

2005-05-20 Thread Jean Eid
?table On Fri, 20 May 2005, Wladimir Eremeev wrote: Dear Ravi, From a vector, I want to get the unique values and the counts of these unique values in the vector. For example, x-c(2,1,2,1,4,2,1,4,1,1) try hist(x,plot=FALSE,breask=unique(x))$counts [1] 5 3 0 0 0 2 -- Best regards

RE: [R] R: looping

2005-05-20 Thread Huntsinger, Reid
Are you sure that's what you want to do? The subscript is a logical vector of length 3, subscripting a 3 x 3 matrix, so you're treating the matrix as a vector (stacked columns) and recycling the indices. The first iteration modifies 6 entries of the matrix. It looks like you want to replace the

Re: [R] constrained optimization

2005-05-20 Thread Christophe Pouzat
[EMAIL PROTECTED] wrote: Hello, I've got to compute a minimization equation under an equality constraint (Min g(x1,x2,x3) with x1+x2=const). The Constroptim function does not authorize an equality condition but only inequality conditions. Which function can I use instead? Hi, What about trying

Re: [R] R: looping

2005-05-20 Thread Clark Allan
sorry everyone the previous code seems to have been wrong. this is the corrected code ie the last line z-matrix(c(1:9),3,3) top-c(1.5,5.5,9) for (i in 1:3) z[,i][z[,i]top[i]]-top[i] / allan Huntsinger, Reid wrote: Are you sure that's what you want to do? The subscript is a logical

RE: [R] issues with identical()

2005-05-20 Thread Liaw, Andy
d1 - data.frame(x=1:3, y=4:6) d2 - data.frame(x=1:3, z=4:6) d3 - data.frame(x=1:3, y=4:6) identical(d1, d2) [1] FALSE identical(d1, d3) [1] TRUE Andy From: Jean Eid Hi all, hope you having a nice day, I ahve this weird results with identical (probably I am not understanding

Re: [R] issues with identical()

2005-05-20 Thread Duncan Murdoch
Jean Eid wrote: Hi all, hope you having a nice day, I ahve this weird results with identical (probably I am not understanding correctly what it does ...) I have these two data frames and I issue : identical(temp, temp1) [1] FALSE However, these data frames are Nx2 and when I issue:

Re: [R] issues with identical()

2005-05-20 Thread Peter Dalgaard
Jean Eid [EMAIL PROTECTED] writes: str(temp) `data.frame': 7072 obs. of 2 variables: $ pub_id : int 1 1000 10001 10002 10003 10004 10005 10006 10007 $ faminc90: int -2 5998 19900 43000 35000 4 56538 61000 36000 39105 str(temp1) `data.frame': 7072 obs. of 2 variables: $

Re: [R] issues with identical()

2005-05-20 Thread Prof Brian Ripley
On Fri, 20 May 2005, Jean Eid wrote: Hi all, hope you having a nice day, I ahve this weird results with identical (probably I am not understanding correctly what it does ...) Why should a data frame with colunns pub_id faminc90 a data frame with colunns pub_id faminc be considered

[R] tune.svm in {e1071}

2005-05-20 Thread David Meyer
Amir, Dear All , 1- I'm trying to access the values of fitted(model) after model- tune.svm( ) but seemingly it is not poosible. How can I access to values of fitted ? However ,it is possible only after model- svm( ) tune.svm() is a wrapper to tune() and as such returns a tune-object. That

Re: [R] covariance analysis by using R

2005-05-20 Thread Wuming Gong
You may fit the model using lm() directly - R will set up a coding for qualitative predictor automatically (taking experiments as qualitative predictor). HTH Wuming On 5/18/05, [EMAIL PROTECTED] wrote: Hello sir: Here's a question on covariance analysis which needs your help. There're 3

[R] comparing a vactor of values in IF statement.

2005-05-20 Thread Jagarlamudi, Choudary
Hi, my vector V- c(1,0.5,0.06,0.056,0.01,0.04,0.4,0.9,0.82,0.1) if( V 0.5) { V - 1 - V } I get a warning saying only the first element will be used in comparing (if V 0.5). However, my results tell me vis-versa ,it actually compares every element of the vector V with 0.5 and that is

Re: [R] comparing a vactor of values in IF statement.

2005-05-20 Thread Gabor Grothendieck
Try V - ifelse(V 0.5, 1-V, V) or V - pmin(V, 1-V) On 5/20/05, Jagarlamudi, Choudary [EMAIL PROTECTED] wrote: Hi, my vector V- c(1,0.5,0.06,0.056,0.01,0.04,0.4,0.9,0.82,0.1) if( V 0.5) { V - 1 - V } I get a warning saying only the first element will be used in comparing (if

RE: [R] comparing a vactor of values in IF statement.

2005-05-20 Thread Ravi Varadhan
Both V[V 0.5] - 1 - V[V 0.5] and ifelse(V0.5, 1-V,V) should do it. Ravi. -- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins

Re: [R] R annoyances

2005-05-20 Thread Jari Oksanen
On 20 May 2005, at 16:37, Philippe Grosjean wrote: The only aspect I don't like is a too loosely use of the dot in functions: both in functions names, in object classes and in generic functions / methods. Hence, we have for instance: 'data.frame', 'help.search' and 'summary.matrix'... just

[R] segmented regression

2005-05-20 Thread Park, Kyong H Mr. RDECOM
Hi, do you have any luck in fitting the regression? If so can you share with me? I appreciate your help. Kyong [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread Alex K
Hello, I am very new to R, and this is certainly and uber-newby question: I am trying to read a vector of numeric data that contains the log of daily DJI returns and simply plot a histogram of it. The data I have is in a text file format, on each line a number represents the log of the

[R] bootstrapping vectors of unequal length

2005-05-20 Thread Matt Oliver
Dear R Help List, I have a vector of n and a vector of n-1 and I want to use boot() to bootstrap the ratio of their respective medians. I want to eventually use boot.ci() to generate confidence intervals. Because the vectors are not equal in length, I tried a few things, but have yet to be

[R] [R-pkgs] Version 1.0-1 of bayesm

2005-05-20 Thread Peter E. Rossi
Version 1.0-1 of bayesm is now available on CRAN. This is our first production version which include s much improved documentation as well as five data sets used in our book, Bayesian Statistics and Marketing. peter r Peter E. Rossi Joseph T. and Bernice

Re: [R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread Uwe Ligges
Alex K wrote: Hello, I am very new to R, and this is certainly and uber-newby question: I am trying to read a vector of numeric data that contains the log of daily DJI returns and simply plot a histogram of it. The data I have is in a text file format, on each line a number represents the

Re: [R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread Alex K
On 5/20/05, Uwe Ligges [EMAIL PROTECTED] wrote: Alex K wrote: Hello, I am very new to R, and this is certainly and uber-newby question: I am trying to read a vector of numeric data that contains the log of daily DJI returns and simply plot a histogram of it. The data I

Re: [R] bootstrapping vectors of unequal length

2005-05-20 Thread Uwe Ligges
Matt Oliver wrote: Dear R Help List, I have a vector of n and a vector of n-1 and I want to use boot() to bootstrap the ratio of their respective medians. I want to eventually use boot.ci() to generate confidence intervals. Because the vectors are not equal in length, I tried a few things, but

Re: [R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread Alex K
Hi Patrick, thank you for your reply, On 5/20/05, Patrick Burns [EMAIL PROTECTED] wrote: Two minor points: 1) You surely have logarithmic returns rather than the log of (some type of) returns. Yes, obviously, my mistake. 2) Once you get data suitable for a histogram, do:

RE: [R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread BXC (Bendix Carstensen)
You (and the mailing list) would defintely benefit from cliking on: Help - Manuals - An introduction to R and spend a few hours in frot of R while reading that. Bendix -- Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2 DK-2820 Gentofte

[R] Big-endian / Little-endian byte swap

2005-05-20 Thread Tuszynski, Jaroslaw W.
Hi, Is there a way to perform Big-endian / Little-endian byte swap in R? An ugly way is by using readBin/writeBin: ByteSwap = function(X, size) { writeBin(X, tmp.dat) readBin(tmp.dat, typeof(X), n = length(x), size=size, endian=swap) } x =

Re: [R] Reading Numeric Data -- Trivial Question

2005-05-20 Thread Uwe Ligges
Alex K wrote: On 5/20/05, Uwe Ligges [EMAIL PROTECTED] wrote: Alex K wrote: Hello, I am very new to R, and this is certainly and uber-newby question: I am trying to read a vector of numeric data that contains the log of daily DJI returns and simply plot a histogram of it. The data I have is

Re: [R] laten class analysis

2005-05-20 Thread simone gabbriellini
thank you Andy Simone Il giorno 20/mag/05, alle 12:37, Liaw, Andy ha scritto: You have to have the package installed for help.search() to find things in it. You could try RSiteSearch(latent class, restrict=function) Andy From: Simone gabbriellini my help.search didn't give me any result :(

RE: [R] R annoyances

2005-05-20 Thread Taylor, Z Todd
On Friday, May 20, 2005 11:29 AM, Jari Oksanen wrote: The most beautiful thing in old R (I started with 0.63) was that it was in the elegant unix tradition: all lower case and point (full stop, period, whatever) in places where you needed it. It is unfortunate that other languages are

Re: [R] R annoyances

2005-05-20 Thread Duncan Murdoch
Taylor, Z Todd wrote: On Friday, May 20, 2005 11:29 AM, Jari Oksanen wrote: The most beautiful thing in old R (I started with 0.63) was that it was in the elegant unix tradition: all lower case and point (full stop, period, whatever) in places where you needed it. It is unfortunate that

[R] print format for difftime

2005-05-20 Thread BXC (Bendix Carstensen)
Has anyone written a function that will print a difftime in the form: hh:mm:ss or yy-mm-dd hh:mm:ss depending on the actual size. (sloppy notation for months/minutes, but surely you get the point). Bendix -- Bendix Carstensen Senior Statistician Steno Diabetes Center Niels