[R] How to draw x-axis time label.

2004-10-18 Thread Ivy_Li
Hi everybody, Could I consult one problem? It is about plot Now I do some analysis in plot . I need to draw a plot which x-axis is time . But when I run the funtion of plot . The x-label are very oddness number, such as the time is 2004-08-05 09:08:48, but the x-label is

Re: [R] How to draw x-axis time label.

2004-10-18 Thread Marc Mamin
Hello Ivy, Your scale shows times in seconds since 1970 (I guess it is 1970) usually, I don't draw the axis with plot (see xaxt=n), but call axis aftewards, giving the ticks positions and the labels as strings, using format. With your example: format(Time,'%d %b %Y') [1] 05 Aug 2004 13 Aug

: [R] How to draw x-axis time label.

2004-10-18 Thread Ivy_Li
New Area, Shanghai, China Tel: 021-5080-2000 *11754 Email: [EMAIL PROTECTED] -- : Marc Mamin [mailto:[EMAIL PROTECTED] : 20041018 15:03 : Ivy_Li; [EMAIL PROTECTED] : Re: [R] How to draw x-axis time label. Hello Ivy, Your scale shows times in seconds since 1970 (I guess it is 1970

Re: : [R] How to draw x-axis time label.

2004-10-18 Thread Prof Brian Ripley
On Mon, 18 Oct 2004, Ivy_Li wrote: Thank you for helping me! I try the pretty funtion to select the x-axis position value.Then I use the format funtion. xax.pos - pretty(as.numeric(x$x.name)) format(xax.pos,'%d %b %y') xax.pos [1] 109160 109180 109200 109220 109240

[R] Tinn-R 0.0.9 r1.09 is released

2004-10-18 Thread Philippe Grosjean
Tinn-R is a small ( 2 Mb), but feature-rich, text/code editor for Windows. It is distributed under GPL. Tinn-R contains various tools to interact with R (submit code in whole, or line by line; list objects; clear the user workspace or graph devices; stop current computation; get help on a

[R] Recoding factors

2004-10-18 Thread Neil Leonard
I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Cheers, Neil __ [EMAIL PROTECTED]

Re: [R] Recoding factors

2004-10-18 Thread Uwe Ligges
Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Depends on what you are going to do with the Twin ... Uwe Ligges

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
I want Twin and Triplet to both be recoded as Multiple Neil On 18/10/2004, at 7:43 PM, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the

Re: [R] Recoding factors

2004-10-18 Thread Prof Brian Ripley
On Mon, 18 Oct 2004, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice?

[R] concatenating lists elementwise

2004-10-18 Thread Robin Hankin
Hi How do I concatenate two lists element-by-element? Example: list.1 - list(temperature=c(hot,cold) , size=c(big,medium)) list.2 - list(temperature=c(lukewarm) , size=c(massive,tiny)) list.wanted - list(temperature=c(hot,cold,lukewarm) , size=c(big,medium,massive,tiny))

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
Yes that's it. Thanks Neil On 18/10/2004, at 7:57 PM, Prof Brian Ripley wrote: On Mon, 18 Oct 2004, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have

Re: [R] concatenating lists elementwise

2004-10-18 Thread Prof Brian Ripley
On Mon, 18 Oct 2004, Robin Hankin wrote: How do I concatenate two lists element-by-element? Example: list.1 - list(temperature=c(hot,cold) , size=c(big,medium)) list.2 - list(temperature=c(lukewarm) , size=c(massive,tiny)) list.wanted - list(temperature=c(hot,cold,lukewarm) ,

[R] nnet learning

2004-10-18 Thread Samuel Kemp
Hi, I am trying to make a neural network learning a noisy sine wave. Suppose I generate my data like so.. x - seq(-2*pi, 2*pi, length=500) y - sin(x) + rnorm(500, sd=sqrt(0.075)) I then train the neural net on the first 400 points using c - nnet(as.matrix(x[1:400]),as.matrix(y[1:400]), size=3,

Re: [R] nnet learning

2004-10-18 Thread Prof Brian Ripley
On Mon, 18 Oct 2004, Samuel Kemp wrote: I am trying to make a neural network learning a noisy sine wave. Suppose I generate my data like so.. x - seq(-2*pi, 2*pi, length=500) y - sin(x) + rnorm(500, sd=sqrt(0.075)) I then train the neural net on the first 400 points using c -

[R] why package gregmisc did not work

2004-10-18 Thread Xiyan Lon
Dear useR I want to know why package gregmisc did not work very well. I did not find this package in my library directory. local({a - CRAN.packages() + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a, dependencies=TRUE)}) trying URL

Re: [R] why package gregmisc did not work

2004-10-18 Thread Dimitris Rizopoulos
Hi xiyanlon, It gives you the reason why `library(gregmisc)' doen't work: bundle 'gregmisc' successfully unpacked and MD5 sums checked ^^ So it's no longer a library. Look at http://tolstoy.newcastle.edu.au/R/packages/04/0056.html for more info Best, Dimitris Dimitris Rizopoulos Ph.D.

Re: [R] There is no package gregmisc (was why package gregmisc did not work)

2004-10-18 Thread Prof Brian Ripley
As it says very clearly: There is no package called 'gregmisc' ^^^ There is a _bundle_ called 'gregmisc', containing packages gtools, gdata, gmodels and gplots. There used to be a package called `gregmisc', but there is no more. See

[R] Increasing computiation time per column using lapply

2004-10-18 Thread Henning Redestig
Hi, Would be very glad for help on this problem. Using this code: temp-function(x, bins, tot) { return(as.numeric(lapply(split(x, bins), wtest, tot))); } wtest - function(x, y) { return(wilcox.test(x,y)$p.value); } rs - function(x, bins) { binCount - length(split(x[,1], bins)); tot -

[R] multiv

2004-10-18 Thread Oscar A. Moreno
What happened to multiv package? I have installed R 2.0.0 in my Mac and I could not find this package. I see other things have been reorganized. I have read What's New and I have used the search facility in the RHelp panel to no avail. Oscar A. Moreno [EMAIL PROTECTED]

Re: [R] There is no package gregmisc (was why package gregmisc did not work)

2004-10-18 Thread Xiyan Lon
Thank to Dimitris and Prof. Brian Ripley. Now I understand why I did not find package gregmisc in my library directory. http://tolstoy.newcastle.edu.au/R/packages/04/0056.html It is announce a few week ago... smile. Best wishess, xiyanlon --- Prof Brian Ripley [EMAIL PROTECTED] wrote: As it

[R] installing package 'kinship'

2004-10-18 Thread Katalin Csillery
Dear All, I have problem installing the 'kinship' package. I used the 'install.packages' from R command line and had no problem installing other packages before. Here is what I get: * Installing *source* package 'kinship' ... ** libs gcc -no-cpp-precomp

Re: [R] multiv

2004-10-18 Thread Kjetil Brinchmann Halvorsen
Oscar A. Moreno wrote: What happened to multiv package? I have installed R 2.0.0 in my Mac and I multiv is ORPHANED. If you want it you can go the orphaned subdirectory on CRAN could not find this package. I see other things have been reorganized. I have read What's New and I have used the

Re: [R] Recoding factors

2004-10-18 Thread Chuck Cleland
See ?levels. I think you want something like the following: levels(myfact) - c(Singleton, Multiple, Multiple) Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only

[R] meta.summaries and se's of effect sizes

2004-10-18 Thread Ingmar Visser
Hi All, I would like to use meta.summaries from package rmeta to do a meta-analysis. I have available effect sizes as r's (which could be easily transformed to effect sizes in terms of d's). My problem is that I'm not sure what the se's of these r's should be ... The r-values are themselves

Re: [R] multiv

2004-10-18 Thread Prof Brian Ripley
This is a CRAN question, perhaps best addressed to the CRAN maintainers. Did you check on CRAN? Its source exists in the Archive, and it was orphaned a while back. I am not sure why it is not in the Orphaned area: probably timing. On Mon, 18 Oct 2004, Oscar A. Moreno wrote: What happened to

Re: [R] installing package 'kinship'

2004-10-18 Thread Prof Brian Ripley
Please read the posting guide, and do tell us what OS this is. I can guess it is MacOS X, an OS on which quite a number of packages do not compile. You need to change coxfit6.h to have the object extern in all but one of the files it is included in. That is a peculiarity of MacOS X. On Mon,

Re: [R] manual recreation of varConstPower using new fixed effects variables in nlme

2004-10-18 Thread Douglas Bates
PS: Can anyone tell me what the reStruct parameter means? In looking at the verbose output, I obtain a reStruct parameter value of -0.8352462 (this is for my grouping factor for the random effect). Does anyone know what it means? The actual value of my single random effect is different, as is

Re: [R] Testing for normality of residuals in a regression model

2004-10-18 Thread Thomas Lumley
On Fri, 15 Oct 2004, Kjetil Brinchmann Halvorsen wrote: Liaw, Andy wrote: Also, I was told by someone very smart that fitting OLS to data with heteroscedastic errors can make the residuals look `more normal' than they really are... Don't know how true that is, though. Certainly true, since the

[R] how to study the code of R

2004-10-18 Thread rongguiwong
i want to study R programming by studying the existing code from R itself,but i don't know how to read the code,can any one give me some guide? my R is installed in /usr/lib/R/ [EMAIL PROTECTED] ronggui]$ /usr/lib/R/ afm bin doc etc include library modules share version

[R] inferential test for smoother df?

2004-10-18 Thread Bill Shipley
Hello. In loess regression (or gam with cubic spline smoothers, I think) it is possible to fit models with different numbers of equivalent parameters – thus model df –and then conduct an inferential test via anova. Is this a valid way of choosing the smoother df? Specifically, I fix a

Re: [R] Survreg with gamma distribution

2004-10-18 Thread Thomas Lumley
On Sun, 17 Oct 2004, Kuan-Ta Chen wrote: Hi, all: I find survreg {survival} has provided many distributions such as weibull, lognormal, etc. But I wonder why it doesn't have the support for gamma distribution since it should be a good distr. in lifetime analysis. Can anybody figure out the reason?

RE: [R] concatenating lists elementwise

2004-10-18 Thread Huntsinger, Reid
I don't know of a way other than brute force: list.3 - list() for (i in union(names(list.1),names(list.2))) list.3[[i]] - union(list.1[[i]],list.2[[i]]) list.3 $temperature [1] hot cold lukewarm $size [1] big medium massive tiny I suppose one could write a method for

Re: [R] meta.summaries and se's of effect sizes

2004-10-18 Thread Thomas Lumley
On Mon, 18 Oct 2004, Ingmar Visser wrote: Hi All, I would like to use meta.summaries from package rmeta to do a meta-analysis. I have available effect sizes as r's (which could be easily transformed to effect sizes in terms of d's). My problem is that I'm not sure what the se's of these r's should

Re: [R] sapply and loop

2004-10-18 Thread Thomas Lumley
On Sat, 16 Oct 2004, Zhen Pang wrote: Dear all, I am doing 200 times simulation. For each time, I generate a matrix and define some function on this matrix to get a 6 dimension vector as my results. As the loop should be slow, I generate 200 matrice first, and save them into a list named ma,

[R] x is not a open/high/low/close time series

2004-10-18 Thread Dean Sonneborn
I am trying to create a high low close style chart but I keep getting the following error statement; x is not a open/high/low/close time series. I've used the function is.ts and R responds TRUE but the ohlcPlot function gives the above error statement. I'm actually planning to plot some odds

Re: [R] Survreg with gamma distribution

2004-10-18 Thread Kuan-Ta Chen
One million thanks to Prof. Ripley and Prof. Lumley. I think I now have more understanding regarding survreg with gamma distribution. But one of my problems is still there: in the text of Lee, Wang (2003), there are two kinds of parametric fitting: 1) fitting of survival distributions (like

Re: [R] how to study the code of R

2004-10-18 Thread Duncan Murdoch
On Mon, 18 Oct 2004 23:36:05 +0800, rongguiwong [EMAIL PROTECTED] wrote : i want to study R programming by studying the existing code from R itself,but i don't know how to read the code,can any one give me some guide? my R is installed in /usr/lib/R/ [EMAIL PROTECTED] ronggui]$ /usr/lib/R/ afm

Re: [R] Survreg with gamma distribution

2004-10-18 Thread Thomas Lumley
On Tue, 19 Oct 2004, Kuan-Ta Chen wrote: One million thanks to Prof. Ripley and Prof. Lumley. I think I now have more understanding regarding survreg with gamma distribution. But one of my problems is still there: in the text of Lee, Wang (2003), there are two kinds of parametric fitting: 1)

Re: [R] x is not a open/high/low/close time series

2004-10-18 Thread Dirk Eddelbuettel
On Mon, Oct 18, 2004 at 09:33:35AM -0700, Dean Sonneborn wrote: I am trying to create a high low close style chart but I keep getting the following error statement; x is not a open/high/low/close time series. I've used the function is.ts and R responds TRUE but the ohlcPlot function

Re: [R] how to study the code of R

2004-10-18 Thread Roger D. Peng
You need to download the full source code for R. The latest version (2.0.0) is available at http://cran.r-project.org/src/base/R-2/R-2.0.0.tar.gz -roger rongguiwong wrote: i want to study R programming by studying the existing code from R itself,but i don't know how to read the code,can any

[R] R crashes while running RandomForest

2004-10-18 Thread Wensui Liu
I tried to use RF build a model with a continuous variable as the dependent. However, whenever I ran it, R just crashed. But when I catigorize the dependent variable as a binary variable and ran the same model again. It just works. Is there anyone who can help me out? I really appreciate it.

Re: [R] Survreg with gamma distribution

2004-10-18 Thread Göran Broström
On Mon, Oct 18, 2004 at 08:48:40AM -0700, Thomas Lumley wrote: On Sun, 17 Oct 2004, Kuan-Ta Chen wrote: Hi, all: I find survreg {survival} has provided many distributions such as weibull, lognormal, etc. But I wonder why it doesn't have the support for gamma distribution since it should

Re: [R] manual recreation of varConstPower using new fixed effects variables in nlme

2004-10-18 Thread JJ
Thanks much, Dr. Bates. That helps. Would you have any comment on the other part of my other question regarding the manual recreation of varConstPower function using new fixed effects? Im guessing I obtain a singularity error because the additional fixed effects may not alter the return value

Re: [R] Survreg with gamma distribution

2004-10-18 Thread Thomas Lumley
On Mon, 18 Oct 2004, Göran Broström wrote: On Mon, Oct 18, 2004 at 08:48:40AM -0700, Thomas Lumley wrote: However, all the distributions in survreg are location-scale families, But only after a time transformation (usually the log transformation) in most cases

[R] multinomial logistic regression with prior probability

2004-10-18 Thread array chip
Hi, Is there a way to specify proior probability in multinom()? The function has a weight option for individual cases, but I would like to specify prior probability for each category of the response variable, just like what lda() does. My data have categorical independent variables, so I think

[R] I seem to be doing Dcv wrong

2004-10-18 Thread Richard A. O'Keefe
There is a paper (1) A new metric for categorical data, by S. H. Al-Harbi, G. P. McKeown, and V. J. Rayward-Smith, in Statistical Data Mining and Knowledge Discovery, ed. Hamparsum Bozdogan, CRC Press, 2004. This paper introduced a distance measure Dcv for clustering.

Re: [R] how to study the code of R

2004-10-18 Thread Kjetil Brinchmann Halvorsen
rongguiwong wrote: i want to study R programming by studying the existing code from R itself,but i don't know how to read the code,can any one give me some guide? my R is installed in /usr/lib/R/ One trick which can be usefull for a start is to use debug. Choose some function to learn, say

RE: [R] R crashes while running RandomForest

2004-10-18 Thread Liaw, Andy
Such problems are best directed to the package maintainer (me in this case). Please state the version of R, the version of the package, and the OS you're using. Also be explicit on what you mean by crash. If possible, give the example code (and possibly simulated data) that caused the problem.

RE: [R] x is not a open/high/low/close time series

2004-10-18 Thread Gabor Grothendieck
Dean Sonneborn dsonneborn at ucdavis.edu writes: I am trying to create a high low close style chart but I keep getting the following error statement; x is not a open/high/low/close time series. Using is.mts(x) and colnames(x) check that these hold: - the object is an mts - the names of

[R] error in file(file, r)

2004-10-18 Thread shizhu zang
Hi, there. I am trying to read a file into R, but I got following message Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `SwirlSample.txt' . In fact, my file has been already in the current working directory. My R is running on window

[R] error in file(file, r)

2004-10-18 Thread Duncan Murdoch
On Tue, 19 Oct 2004 09:10:45 +0800 (CST), shizhu zang [EMAIL PROTECTED] wrote: Hi, there. I am trying to read a file into R, but I got following message Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file `SwirlSample.txt' . In fact, my file has

Re: [R] sapply and loop

2004-10-18 Thread Zhen Pang
I tried to use Rprof(). As an example, I consider the following code (from Venables Ripley, 1999). library(MASS); library(boot); library(nls) data(stormer) storm.fm - nls(Time ~ b*Viscosity/(Wt - c), stormer, start = c(b=29.401, c=2.2183)) st - cbind(stormer,

[R] Questions of t.test {stats}

2004-10-18 Thread pcscan
We are currently using the t-test in Package stats, t.test(x, y = NULL, alternative = c(two.sided, less, greater), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95, ...) but have some troubles : 1. why does the t-test take so a long time to perform a single test on a

Re: [R] manual recreation of varConstPower using new fixed effects variables in nlme

2004-10-18 Thread JJ
Ah, I think Ive found a solution. A variance function of the form: (d1 + (covariant)^d2)^2 + U, can be made by altering the line in varWeights.varComb to read: apply(as.data.frame(lapply(object, varWeights)), 1, sum) Then the function varComb can be used as in: varComb(varPower(form =