Re: [R] Running Internet Explorer from Withing R
On Thu, 28 Jul 2005, Peter Dalgaard wrote: Walter R. Paczkowski [EMAIL PROTECTED] writes: Good morning, Is it possible to open an html file using IE but from within R? I wrote a small function to generate tables in html but I'd like to write another function to call IE and open the html file. browseURL() (if it exists on Windows) It does. And more generally for any file type, shell.exec (only on Windows) opens a file with the associated application. (browseURL is built on top of shell.exec.) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R: non parametric regression/kernels
hi all i have a another stats question. i would like to solve the following question: y(i)=a+b*x(i)+e(i) i.e. estimate a and b (they should be fixed) but i dont want to specify the standard density to the straight line. this can be done using kernel regression. the fitted line is however fitted locally. does anyone have a reference that will help me with my problem. i am still new to kernels/kernel regression and would like to get into the subject. / allan__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: non parametric regression/kernels
Hi Clark, see: ? loess http://finzi.psych.upenn.edu/R/library/stats/html/loess.html ? scatter.smooth http://finzi.psych.upenn.edu/R/library/stats/html/scatter.smooth.html Regards, Vito Clark Allan Allan at STATS.uct.ac.za wrote: hi all i have a another stats question. i would like to solve the following question: y(i)=a+b*x(i)+e(i) i.e. estimate a and b (they should be fixed) but i dont want to specify the standard density to the straight line. this can be done using kernel regression. the fitted line is however fitted locally. does anyone have a reference that will help me with my problem. i am still new to kernels/kernel regression and would like to get into the subject. / allan Diventare costruttori di soluzioni Became solutions' constructors The business of the statistician is to catalyze the scientific learning process. George E. P. Box Statistical thinking will one day be as necessary for efficient citizenship as the ability to read and write H. G. Wells Top 10 reasons to become a Statistician 1. Deviation is considered normal 2. We feel complete and sufficient 3. We are 'mean' lovers 4. Statisticians do it discretely and continuously 5. We are right 95% of the time 6. We can legally comment on someone's posterior distribution 7. We may not be normal, but we are transformable 8. We never have to say we are certain 9. We are honestly significantly different 10. No one wants our jobs Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/palesesanto_spirito/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] predictive classification groups functions
Hi all, I have a little question about linear discriminant analysis in R. I have a dataframe with datas groupped by 4 cluster. I'd like to know if there is a command that give 4 predictive classification groups functions (one for every cluster group). Thanks of all Leonardo -- Leonardo Lami [EMAIL PROTECTED]www.faunalia.it Via Colombo 3 - 51010 Massa e Cozzile (PT), Italy Tel: (+39)349-1310164 GPG key @: hkp://wwwkeys.pgp.net http://www.pgp.net/wwwkeys.html https://www.biglumber.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Identify function with matplot
Hari Iyer wrote: Hello Is there a way to use the identify function with matplot ? Not directly, but you can write a wrapper for the particular case as in: sines - outer(1:20, 1:4, function(x, y) sin(x / 20 * pi * y)) matplot(sines, pch = 1:4, type = o, col = rainbow(ncol(sines))) identifyMat - function(x, ...){ label - paste(row(x), , , col(x), sep=) identify(row(x), x, labels=label, ...) } identifyMat(sines) Uwe Ligges Thanks. Hari __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] NA handling with lm
Also have a look at this thread from last week https://stat.ethz.ch/pipermail/r-help/2005-July/074550.html Regards, Adai On Thu, 2005-07-28 at 18:59 +0200, Petr Pikal wrote: Hallo On 28 Jul 2005 at 18:44, Andreas Cordes wrote: Hi, I have a problem that is hopefully easily solvable, but I dont find the clue in the documentation. I am examining a linear model. One of the variables has NA values. Even though na.action=na.omit, i get NA as results for this variable. Can I use lm in such a case to get estimates? Or do I have to do some form of imputation before doing so? Here is the call and the results, hope you can help. Best regards, Andreas -- --- lm(formula = ESSIK ~ ALTER + as.factor(S2) + as.factor(S15A) + as.factor(S8) + as.factor(LAND) + as.factor(S18B) + as.factor(BERUF) + as.factor(KIRCHE) + as.factor(H_EINKOM) + as.factor(PARTNERS), na.action = na.omit) Residuals: Min 1Q Median 3Q Max -17.0675 -2.0151 0.4267 2.7644 9.7333 Coefficients: (2 not defined because of singularities) Problem is not in NA handling but that some of your coeficients can be represented as linear combination of other coeficients. You have to omit them. HTH Petr Estimate Std. Error t value Pr(|t|) (Intercept) 23.755915 1.844110 12.882 2e-16 *** [...] as.factor(BERUF)7-1.236836 0.701323 -1.764 0.077942 . as.factor(KIRCHE)1 -0.811751 0.237699 -3.415 0.000649 *** as.factor(H_EINKOM)2NA NA NA NA as.factor(H_EINKOM)3NA NA NA NA as.factor(PARTNERS)1 2.057070 0.342546 6.005 2.23e-09 *** __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] matrix form
If you mean how to create a matrix like below, then you can code it as arm - 1:10 study - rep( 1:4, c(3,3,2,2) ) Num - c(2, 9, ...) df - cbind( arm, study, Num ) but this is really painful. If you have this information stored in Excel, save it as tab delimited or comma separated format and read in using read.delim or read.csv respectively. You can also use scan. See help(read.delim), help(read.csv) or help(scan). If you mean how to extract information from such a matrix, then see help(subset) or read the manuals. Regards, Adai On Thu, 2005-07-28 at 17:45 +0100, Hathaikan Chootrakool wrote: I am a new user, i was wondering how to define a collection of data in matrix form, this is a part of my data,there are 26 studies, 3 Treatments Arm No Study no. Treatment Num(r) Total(n) 111 1 243 221 2 942 331 3 13 41 442 1 12 68 552 2 13 73 662 3 13 72 773 1 4 20 883 3 4 16 994 1 20 116 10 104 3 30 111 I would like to use matrix [study No,Treatment] how can i define code for using matrix? has anyone can help me?,thank you very much. Hathaikan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Forcing coefficents in lm(), recursive residuals, etc.
Hi all, Just to clarify, I know that the predict() function would the normal avenue for applying a model but the problem is that I need to calculate recursive residuals, and the recresid() function needs an object with class lm. Best, R. On 28/07/05, Rick Ram [EMAIL PROTECTED] wrote: Sorry guys, resending this - none of my posts have gone through because HTML emails where not being delivered... sending this plaintext now! On 28/07/05, Rick Ram [EMAIL PROTECTED] wrote: Resending cos I think this didn't get through for some reason... apologies if it arrives twice! -- Forwarded message -- From: Rick Ram [EMAIL PROTECTED] Date: 28-Jul-2005 18:03 Subject: Forcing coefficents in lm(), recursive residuals, etc. To: R-help r-help@stat.math.ethz.ch Hello all, Does anyone know how to constrain/force specific coefficients when running lm()? I need to run recresid() {strucchange package} on the residuals of forecast.lm, but forecast.lm's coefficients must be determined by parameter.estimation.lm I could estimate forecast.lm without lm() and use some other kind of optimisation, but recresid() requires an object with class lm. recresid() allows you to specify a formula, rather than an lm object, but it looks like coefficients are estimated this way too and can't be forced. Here is a bit of code to compensate for my poor explanation:. # Estimate the coefficients of model parameter.estimation.lm = lm(formula = y ~ x1 + x2, data = estimation.dataset) # How do I force the coefficients in forecast.lm to the coeff estimation from parameter.estimation.lm?? forecast.lm = lm(formula = y ~ x1 + x2, data = forecast.dataset) # Because I need recursive residuals from the application of the coefficients from parameter.estimation.lm to a different dataset recresid(forecast.lm) Thanks in advance guys, R. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Binary outcome with non-absorbing outcome state
I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those subjects who fall more than once. I would appreciate suggestions about a models that I could use, how I would quantify the follow-up time, how I account for the imbalance in the data (some subjects would contribute one outcome measure, others multiple measures), etc. Many thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 410-605-7119 - NOTE NEW EMAIL ADDRESS: [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] PLS component selection for GPLS question
How to select the number of PLS components for GPLS for data sets with few samples? Concrete problem: My data set: 9 samples of class A and 37 of class B with 254 descriptors. In the paper: Classification Using Generalized Partial Least Squares, Beiying Ding, Robert Gentleman, Bioconductor Project Working Papers, year 2004, paper 5 Section 2.6 Assessing Prediction: Cite: The optimal number of PLS components is selected by choosing that value of K which minimizes LOOCV error rate for the training set. and in section 3.1.3 Colon data, subsection: Random splitting Cite: Due to the instability of LOOCV error rates for data with few samples and many covariates, comparison of various classifiers based solely on LOOCV classification errors may not be reliable. the authors use random splitting to determine the number of PLS components in GPLS, but I'm still not sure how to choose the right number of PLS components for my data set. I used the function errorest() from package ipred to estimate the error rates und gpls() with Firth procedure switched on. The attached PDF Graphik illustrates the problem for my data set. S_n is the model sensitivity and S_p the model specifity. With 4 component I get the best crossvalidation error rate 17% and with 5 components the best bootstrap error rate 9%, but the sensitivity of the model is only 11% ! If one choose 13 components, one gets 100% sensitivity and 100% specifity and CV error is 34% and the boostrap error is 40% and the risk that the model is overtrained is higher. How much components should I choose now to get the best GPLS model? GPLS_component_selection.pdf Description: Adobe PDF document __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R: graphics devices
a simple question how does one produce plots on two different graphics devices? / allan__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
Alan, I'm not sure what you mean... perhaps plot(y~x) # to the screen pdf(myplot.pdf) plot(y~x) # write the plot to the file dev.off() # close the file dev.off() # close the graphics window s/ On 29/07/05, Clark Allan [EMAIL PROTECTED] wrote: a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
one could use the par command to plot several plots on 1 graphics device. i would like to do the following: say plot(y~x) on one screen and then plot(q~w) on another screen so that one can see both of them together but not on the same graphics device. Sean O'Riordain wrote: Alan, I'm not sure what you mean... perhaps plot(y~x) # to the screen pdf(myplot.pdf) plot(y~x) # write the plot to the file dev.off() # close the file dev.off() # close the graphics window s/ On 29/07/05, Clark Allan [EMAIL PROTECTED] wrote: a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
Eventually one way: With X11() you can open additional graphic devices. x - rnorm(100) y - x + runif(100) plot(x) X11() plot(x,y) Best, Matthias a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
Is this on windows? If so, how about the following: windows() plot(y~x) windows() plot(q~x) For me, this creates two different plot _windows_ and you could tile them to see each side-by-side. But I'm not sure how that would be preferable to having the plots in the same window. What exactly do you mean by different screens? Clark Allan wrote: one could use the par command to plot several plots on 1 graphics device. i would like to do the following: say plot(y~x) on one screen and then plot(q~w) on another screen so that one can see both of them together but not on the same graphics device. Sean O'Riordain wrote: Alan, I'm not sure what you mean... perhaps plot(y~x) # to the screen pdf(myplot.pdf) plot(y~x) # write the plot to the file dev.off() # close the file dev.off() # close the graphics window s/ On 29/07/05, Clark Allan [EMAIL PROTECTED] wrote: a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Console not found
I played around with memory limits in R 2.1.0 under XP in order to be able to work with large matrixes (3600x4100). Among several things I tried was to alter console settings and saving them. Since then, I can't restart Rgui. It says several times 'Console not found' with pieces of the text that usually appears in the console and then crashes. Rterm.exe works fine. I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still console is not found. Any clues on this? Best regards Manuel °°° Manuel Schneider Eawag Environmental chemistry Ueberlandstr. 133 8600 Dübendorf Phone +41 44 823 51 18 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
actually X11() also works under windows! X11() plot(y~x) X11() plot(q~x) On 29/07/05, Chuck Cleland [EMAIL PROTECTED] wrote: Is this on windows? If so, how about the following: windows() plot(y~x) windows() plot(q~x) For me, this creates two different plot _windows_ and you could tile them to see each side-by-side. But I'm not sure how that would be preferable to having the plots in the same window. What exactly do you mean by different screens? Clark Allan wrote: one could use the par command to plot several plots on 1 graphics device. i would like to do the following: say plot(y~x) on one screen and then plot(q~w) on another screen so that one can see both of them together but not on the same graphics device. Sean O'Riordain wrote: Alan, I'm not sure what you mean... perhaps plot(y~x) # to the screen pdf(myplot.pdf) plot(y~x) # write the plot to the file dev.off() # close the file dev.off() # close the graphics window s/ On 29/07/05, Clark Allan [EMAIL PROTECTED] wrote: a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
Hi Allan, in case of many plots in the same window you can try this: options(graphics.record=TRUE) plot(x) plot(x,y) with PgUp and PgDn you check both in the same window. I hope this helps. Roula = Spyridoula Tsonaka Doctoral Student Biostatistical Centre Catholic University of Leuven Kapucijnenvoer 35 B-3000 Leuven Belgium Tel: +32/16/336899 Fax: +32/16/337015 - Original Message - From: Clark Allan [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, July 29, 2005 1:30 PM Subject: [R] R: graphics devices a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
Sounds like you have corrupted your Rconsole file. Fire up rterm and try ?Rconsole and/or read the rw-FAQ to find the file that it is use. It is not removed by uninstalling, and you do need to remove it. (The console settings have nothing whatsoever to do with memory settings.) Your matrices are not particularly large, BTW, provided you have 1GB or more of RAM. If you have much less, adding some RAM is the most effective way of using R. On Fri, 29 Jul 2005, Manuel Schneider wrote: I played around with memory limits in R 2.1.0 under XP in order to be able to work with large matrixes (3600x4100). Among several things I tried was to alter console settings and saving them. Since then, I can't restart Rgui. It says several times 'Console not found' with pieces of the text that usually appears in the console and then crashes. Rterm.exe works fine. I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still console is not found. Any clues on this? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
That's interesting,how can I see the help document of graphics.record option? I use ?options ,but can not find anything about it. Hi Allan, in case of many plots in the same window you can try this: options(graphics.record=TRUE) plot(x) plot(x,y) with PgUp and PgDn you check both in the same window. I hope this helps. Roula = Spyridoula Tsonaka Doctoral Student Biostatistical Centre Catholic University of Leuven Kapucijnenvoer 35 B-3000 Leuven Belgium Tel: +32/16/336899 Fax: +32/16/337015 - Original Message - From: Clark Allan [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, July 29, 2005 1:30 PM Subject: [R] R: graphics devices a simple question how does one produce plots on two different graphics devices? / allan 2005-07-29 -- Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
John Sorkin wrote: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those subjects who fall more than once. I would appreciate suggestions about a models that I could use, how I would quantify the follow-up time, how I account for the imbalance in the data (some subjects would contribute one outcome measure, others multiple measures), etc. Many thanks, John A great reference for this is @Book{the00mod, author = {Therneau, Terry and Grambsch, Patricia}, title ={Modeling Survival Data: Extending the Cox Model}, publisher ={Springer-Verlag}, year = 2000, address = {New York} } Frank John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 410-605-7119 -- NOTE NEW EMAIL ADDRESS: [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
John Sorkin wrote: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those subjects who fall more than once. I would appreciate suggestions about a models that I could use, how I would quantify the follow-up time, how I account for the imbalance in the data (some subjects would contribute one outcome measure, others multiple measures), etc. Many thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 410-605-7119 -- NOTE NEW EMAIL ADDRESS: [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html help.search(recurrent) leads to CRAN pakage survrec. You couls also have a look at CRAN package eha and at Lindsey's package event -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Errbar()-function, cap and logarithmic scaling
Hello! If I use the errbar-function and have a logarithmic scale on the x-axis, then the little horizontal bars at the end of the errbars (cap) disappear. What can I do? Thanks for helping! Ute __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
Singer Willett (2003) also cover this ground. Singer, JD Willett, JB (2003). Applied longitudinal data analysis: Modeling change and event occurrence. New Yok: Oxford University Press. -Original Message- From: Frank E Harrell Jr [EMAIL PROTECTED] Sent: Jul 29, 2005 9:25 AM To: John Sorkin [EMAIL PROTECTED] Cc: R-help@stat.math.ethz.ch Subject: Re: [R] Binary outcome with non-absorbing outcome state John Sorkin wrote: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those subjects who fall more than once. I would appreciate suggestions about a models that I could use, how I would quantify the follow-up time, how I account for the imbalance in the data (some subjects would contribute one outcome measure, others multiple measures), etc. Many thanks, John A great reference for this is @Book{the00mod, author = {Therneau, Terry and Grambsch, Patricia}, title ={Modeling Survival Data: Extending the Cox Model}, publisher ={Springer-Verlag}, year = 2000, address = {New York} } Frank John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 410-605-7119 --- NOTE NEW EMAIL ADDRESS: [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Frank Funderburk Converting Data to ... Information for Action .Through Understanding [EMAIL PROTECTED] voice mail: 888-431-7594 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Console not found
On 7/29/2005 8:01 AM, Manuel Schneider wrote: I played around with memory limits in R 2.1.0 under XP in order to be able to work with large matrixes (3600x4100). Among several things I tried was to alter console settings and saving them. Since then, I can't restart Rgui. It says several times 'Console not found' with pieces of the text that usually appears in the console and then crashes. Rterm.exe works fine. I've now unistalled R 2.1.0 and installed R 2.1.1 with no effect, still console is not found. Any clues on this? You have probably got something bad in your startup files. See appendices B.1 and B.2 of the R-intro manual for all the details. In summary, R looks in Renviron.site, Rprofile.site, .Rprofile, .RData and Rconsole for startup information. (Where it looks is complicated; see the manual.) There are command line options to tell it to skip these; in particular, --vanilla tells it to skip all of them. I'd guess your problem is with Rconsole, because that's where the console settings are normally saved. Rename it to something else and your problems should go away. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
I'd suggest starting with the documentation. See ?Devices and then look at some of the other functions referenced in the See Also section of ?Devices. Basically, you produce plots on two different graphics devices by this sequence: 1) open a graphics device 2) produce a plot 3) open another graphics device 4) produce a plot and depending on which graphic device(s) you are using you may have follow with dev.off() to actually get any useful result. And of course there is always the documentation you can download from the R website. Specifically, the one titled An Introduction to R in which I found a section titled Multiple graphics devices which starts with In advanced use of R it is often useful to have several graphics devices in use at the same time. (this was from the R 2.0.1 version of the manual, to be precise) -Don At 1:30 PM +0200 7/29/05, Clark Allan wrote: a simple question how does one produce plots on two different graphics devices? / allan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
This is for Windows only, and documented in ?windows README.rw2011 (or whatever) It's more usual to switch recording on when you need it, either in the windows() call or from a menu. ?options only tells you about the standard options, not those used on specific platforms or by packages (and it does say that, in `Options used in base R'). On Fri, 29 Jul 2005, ronggui wrote: That's interesting,how can I see the help document of graphics.record option? I use ?options ,but can not find anything about it. Hi Allan, in case of many plots in the same window you can try this: options(graphics.record=TRUE) plot(x) plot(x,y) with PgUp and PgDn you check both in the same window. I hope this helps. Roula = Spyridoula Tsonaka Doctoral Student Biostatistical Centre Catholic University of Leuven Kapucijnenvoer 35 B-3000 Leuven Belgium Tel: +32/16/336899 Fax: +32/16/337015 - Original Message - From: Clark Allan [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, July 29, 2005 1:30 PM Subject: [R] R: graphics devices a simple question how does one produce plots on two different graphics devices? / allan 2005-07-29 -- Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
John Sorkin jsorkin at grecc.umaryland.edu writes: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. Chapter 4.3 in http://www.mayo.edu/hsr/people/therneau/survival.ps might also help. Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Error Downloading Matrix Package
I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Error Downloading Matrix Package
Doran, Harold wrote: I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? Do you have write permission on the library into which you are trying to install package Matrix? In particular, have you really deleted the package from the right library? Do you have the package loaded (R should tell it, hence I do not believe this is the problem)? If this is a library used by multiple users, does any of those users have the package loaded? Uwe Ligges install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Error Downloading Matrix Package
Possible answers: 1) You do not have permission to remove the package from its previous location. 2) Windows mistakenly thinks that some file in the package is still open. Try deleting the directory from Windows Explorer. If 2) you may have to log out or reboot Windows before you can do so. BTW, my Windows setup updated successfully this morning, so this is indeed a local problem. On Fri, 29 Jul 2005, Doran, Harold wrote: I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Error Downloading Matrix Package
After restarting Windows Matrix was properly updated. Not quite sure where the error was, but it is certainly local. -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 11:58 AM To: Doran, Harold Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED] Subject: Re: [R] Error Downloading Matrix Package Possible answers: 1) You do not have permission to remove the package from its previous location. 2) Windows mistakenly thinks that some file in the package is still open. Try deleting the directory from Windows Explorer. If 2) you may have to log out or reboot Windows before you can do so. BTW, my Windows setup updated successfully this morning, so this is indeed a local problem. On Fri, 29 Jul 2005, Doran, Harold wrote: I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] replace matrix values with names from a dataframe
Does the following help: set.seed(1) Lvls - factor(letters[1:4]) A - array(sample(4, 6, replace=TRUE), dim=c(2,3)) A[] - levels(Lvls)[A] A [,1] [,2] [,3] [1,] b c a [2,] b d d If not, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html; and submit another question (if the process of working the posting guide does not itself provide enlightenment). spencer graves [EMAIL PROTECTED] wrote: Hi, I am looking for a way to replace matrix values with names from a dataframe. Let me do this by example: I have a dataframe: data city.name 1munich 2 paris 3 tokio 4london 5boston each city name corresponds to only one index number (there is only one observation for each city). After doing some matching I end up with a matrix that looks something like this: X [,1] [,2] [1,]24 [2,]51 [3,]53 [4,] 12 217 [5,] 16 13 Here the numbers in the matrix are the index numbers from my original dataset, each row is a matched pair (so e.g. the first row tells me that obs. number 2 (i.e. Paris) was matched to obs number 4 (i.e. London)). Now I am looking for a quick way to transform the index numbers back to city names, so that at the end I have a matrix that looks something like this: X.transformed [,1] [,2] [1,] paris london [2,] boston munich [3,] bostontokio [4,] 12 217 [5,] 16 13 etc. So instead of the index number, the matrix should contain the names that corresponds to it. In my real data, I have many many names and replacing each value by hand would take too long. Any help is highly appreciated. Thank you. Regards, Jens __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Error Downloading Matrix Package
I've gotten that error message when trying to update a package I had attached. oops. (like do-it-yourself lobotomy.) Then I had to install.packages, because much of it got deleted and it wouldn't work any more. spencer graves Prof Brian Ripley wrote: Possible answers: 1) You do not have permission to remove the package from its previous location. 2) Windows mistakenly thinks that some file in the package is still open. Try deleting the directory from Windows Explorer. If 2) you may have to log out or reboot Windows before you can do so. BTW, my Windows setup updated successfully this morning, so this is indeed a local problem. On Fri, 29 Jul 2005, Doran, Harold wrote: I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
On Fri, 29 Jul 2005, John Sorkin wrote: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. I know how to model time to the first fall (e.g. Cox Proportional Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model the data if I include the data for those subjects who fall more than once. Various people have already given references that deal with marginal Cox models. I'd second Frank Harrell's recommendation of Therneau Grambsch. Computationally this is very straightforward: each person has multiple records corresponding to the times between events, and in a Cox model you add +cluster(id) to the model formula to get the right standard errors, where id is unique identifier for individuals. The difficult part is deciding which person-time to compare: eg should someone who has recently had a second event at time 500 be compared to other people who have recently had a second event, other people who have recently had any sort of event, other people at time 500, etc. Another possibility is frailty models, the analogue of generalized linear mixed models. As with GLMMs, even fitting these is tricky and statistical theory isn't that well-developed. The survival package does have an implementation, though. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Binary outcome with non-absorbing outcome state
On Fri, 29 Jul 2005, Dieter Menne wrote: John Sorkin jsorkin at grecc.umaryland.edu writes: I am trying to model data in which subjects are followed through time to determine if they fall, or do not fall. Some of the subjects fall once, some fall several times. Follow-up time varies from subject to subject. Chapter 4.3 in http://www.mayo.edu/hsr/people/therneau/survival.ps might also help. That document is included in the survival package, but AFAICS it doesn't talk about multiple events, just about time-varying covariates. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Error Downloading Matrix Package
You should have got a different error message, namely package some_pkg is in use and will not be installed and that is what I got when I tried it. On Fri, 29 Jul 2005, Spencer Graves wrote: I've gotten that error message when trying to update a package I had attached. oops. (like do-it-yourself lobotomy.) Then I had to install.packages, because much of it got deleted and it wouldn't work any more. spencer graves Prof Brian Ripley wrote: Possible answers: 1) You do not have permission to remove the package from its previous location. 2) Windows mistakenly thinks that some file in the package is still open. Try deleting the directory from Windows Explorer. If 2) you may have to log out or reboot Windows before you can do so. BTW, my Windows setup updated successfully this morning, so this is indeed a local problem. On Fri, 29 Jul 2005, Doran, Harold wrote: I'm trying to update my Matrix package given the update last night. But the following error is generated. I've tried restarting R and deleting my old Matrix package. Can anyone suggest how this might be resolved? install.packages('Matrix') trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.1/Mat rix_0.98-1.zip' Content type 'application/zip' length 891288 bytes opened URL downloaded 870Kb package 'Matrix' successfully unpacked and MD5 sums checked Error: cannot remove prior installation of package 'Matrix' traceback() 4: stop(sprintf(gettext(cannot remove prior installation of package '%s'), curPkg), domain = NA, call. = FALSE) 3: unpackPkg(foundpkgs[okp, 2], foundpkgs[okp, 1], lib, installWithVers) 2: .install.winbinary(pkgs = pkgs, lib = lib, contriburl = contriburl, method = method, available = available, destdir = destdir, installWithVers = installWithVers, dependencies = dependencies) 1: install.packages(Matrix) This is on a Windows XP machine for R 2.11 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] about usage of weights in nnet
Hi There, I got some results from using nnet on a two-class problem, and I'd like to hear your comments to understand well about the algorithm. In the training set, the ratio of class 1 to class 2 is about 23:77. I did a 5-fold cross validation. The networks were trained twice, one with 'weights=1', one with 'weights=ifelse(species==class1, 77/33, 1)'(pointed out by Prof. Brian Ripley).All other settings are same. The average Matthew Correlation Coeffience for the one with weights=1 is 0.80, significantly larger than that of the other, 0.74. So, it seems weighting the unbalanced samples does not help performance on evaluations, which is against my initial thoughts. My question would be, does that mean the training data is not unbalanced enough? then how unbalanced is enough? Or it was totally just a signal event? Or it was just some suboptimal results? Any references regarding this issue in particular? Thanks! Best regards, Baoqiang Cao __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R: graphics devices
I put the options() call into my Rprofile.site code (there are other ways to do this, too) so that it's automatic at startup. ?Startup documents other ways you can do this. I've never run into problems having recording always on, but maybe there are some I'm unaware of. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent: Friday, July 29, 2005 8:09 AM To: ronggui Cc: r-help@stat.math.ethz.ch Subject: Re: [R] R: graphics devices This is for Windows only, and documented in ?windows README.rw2011 (or whatever) It's more usual to switch recording on when you need it, either in the windows() call or from a menu. ?options only tells you about the standard options, not those used on specific platforms or by packages (and it does say that, in `Options used in base R'). On Fri, 29 Jul 2005, ronggui wrote: That's interesting,how can I see the help document of graphics.record option? I use ?options ,but can not find anything about it. Hi Allan, in case of many plots in the same window you can try this: options(graphics.record=TRUE) plot(x) plot(x,y) with PgUp and PgDn you check both in the same window. I hope this helps. Roula = Spyridoula Tsonaka Doctoral Student Biostatistical Centre Catholic University of Leuven Kapucijnenvoer 35 B-3000 Leuven Belgium Tel: +32/16/336899 Fax: +32/16/337015 - Original Message - From: Clark Allan [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, July 29, 2005 1:30 PM Subject: [R] R: graphics devices a simple question how does one produce plots on two different graphics devices? / allan 2005-07-29 -- Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Way to make R idle for some time and try something again later
Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Thanks in advance, Tae-Hoon Chung Post-Doctoral Researcher Translational Genomics Research Institute (TGen) 445 N. 5th Street (Suite 530) Phoenix, AZ 85004 1-602-343-8724 (Direct) 1-480-323-9820 (Mobile) 1-602-343-8840 (Fax) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
On 7/29/2005 3:13 PM, Tae-Hoon Chung wrote: Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Sys.sleep(10) should give you a 10 second pause with very little impact on the system. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
Which operating system are you using ? See help(Sys.sleep), which might be what you want but there may be other ways in determining if a file is being accessed by another program. Regards, Adai On Fri, 2005-07-29 at 12:13 -0700, Tae-Hoon Chung wrote: Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Thanks in advance, Tae-Hoon Chung Post-Doctoral Researcher Translational Genomics Research Institute (TGen) 445 N. 5th Street (Suite 530) Phoenix, AZ 85004 1-602-343-8724 (Direct) 1-480-323-9820 (Mobile) 1-602-343-8840 (Fax) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
Dear Tae-Hoon: 1. RSiteSearch('wait') will tell you that Sys.sleep() is what you want. Although this list is terrific, R's built-in help/search tools should always be tried first (they're faster when you hit the right search term). 2. The other part of the puzzle is ?try -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tae-Hoon Chung Sent: Friday, July 29, 2005 12:13 PM To: RHelp Subject: [R] Way to make R idle for some time and try something again later Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Thanks in advance, Tae-Hoon Chung Post-Doctoral Researcher Translational Genomics Research Institute (TGen) 445 N. 5th Street (Suite 530) Phoenix, AZ 85004 1-602-343-8724 (Direct) 1-480-323-9820 (Mobile) 1-602-343-8840 (Fax) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
I done something very similar -- have R watch a file, and whenever new data is added to the file, read the new data from the file. In my case, new data was arriving once per minute, so I needed to have R wait about a minute before looking for new data. On my unix-based system, I found that if I usd Sys.sleep( N ) then cpu usage immediately went up drastically. If the the system is otherwise fairly idle, cpu usage goes up to nearly 100%. A cpu monitor shows that R is using the cpu cycles. If I use instead system('sleep N') cpu usage does not go up. (where N is the number of seconds to sleep) version _ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor1.1 year 2005 month06 day 20 language R At 12:13 PM -0700 7/29/05, Tae-Hoon Chung wrote: Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Thanks in advance, Tae-Hoon Chung Post-Doctoral Researcher Translational Genomics Research Institute (TGen) 445 N. 5th Street (Suite 530) Phoenix, AZ 85004 1-602-343-8724 (Direct) 1-480-323-9820 (Mobile) 1-602-343-8840 (Fax) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
Don MacQueen wrote: I done something very similar -- have R watch a file, and whenever new data is added to the file, read the new data from the file. In my case, new data was arriving once per minute, so I needed to have R wait about a minute before looking for new data. On my unix-based system, I found that if I usd Sys.sleep( N ) then cpu usage immediately went up drastically. If the the system is otherwise fairly idle, cpu usage goes up to nearly 100%. A cpu monitor shows that R is using the cpu cycles. This is system-specific. In Windows, CPU usage measures in at 0% while in a Sys.sleep loop. (It's not really zero, because R checks for events to update the display, but it's very low). Duncan Murdoch If I use instead system('sleep N') cpu usage does not go up. (where N is the number of seconds to sleep) version _ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor1.1 year 2005 month06 day 20 language R At 12:13 PM -0700 7/29/05, Tae-Hoon Chung wrote: Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? Thanks in advance, Tae-Hoon Chung Post-Doctoral Researcher Translational Genomics Research Institute (TGen) 445 N. 5th Street (Suite 530) Phoenix, AZ 85004 1-602-343-8724 (Direct) 1-480-323-9820 (Mobile) 1-602-343-8840 (Fax) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Don't understand plotmath behaviour (bug?)
Numbers, not in characters strings do not come out bold: plot(1:5, type = n) text(x=3,y=3, quote(bold(paste(a==a ~~ 0.5 == 0.5 On 7/25/05, Wladimir Eremeev [EMAIL PROTECTED] wrote: Dear Thomas, TL In case 1 you have the string 0.5, in case 2 you have the number 0.5. TLtext(x=2,y=2, quote(bold(0.5==0.5))) TL shows what is happening. I know about the different types in the cases. That is, 'bold' affects only on text strings. Am I right? --- Best regards, Wladimirmailto:[EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Way to make R idle for some time and try something again later
This depends on what else is going on. My guess is that you are running the Aqua GUI, and it is servicing the GUI which is taking the time, not R itself. On all of Linux, Solaris and Windows (RGui or Rterm) Sys.sleep() does use very close to zero resources at the beginning of a session, but things may be different if e.g. tcltk widgets are in use. On Fri, 29 Jul 2005, Don MacQueen wrote: I done something very similar -- have R watch a file, and whenever new data is added to the file, read the new data from the file. In my case, new data was arriving once per minute, so I needed to have R wait about a minute before looking for new data. On my unix-based system, I found that if I usd I don't think your system IS `unix-based' (Unix is a trademark, and MacOS X is based on a rather different kernel). It is quite possible that it is behaving differently from the POSIX description of Unix system calls on which R is based for Unix-alikes. Sys.sleep( N ) then cpu usage immediately went up drastically. If the the system is otherwise fairly idle, cpu usage goes up to nearly 100%. A cpu monitor shows that R is using the cpu cycles. If I use instead system('sleep N') cpu usage does not go up. Does that freeze the GUI? It certainly freezes tcltk widgets on Unix. (where N is the number of seconds to sleep) version _ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor1.1 year 2005 month06 day 20 language R At 12:13 PM -0700 7/29/05, Tae-Hoon Chung wrote: Hi, All; I have a question. In R, what is the best way to make R idle for a while and try something again later? For example, suppose there is an R job which accesses a file that may be shared with other active jobs. So when the file is being accessed by other job, your job will not be able to access the file and your job will crash because of that. To avoid this, you want your job to try to access the file repeatedly with some time interval, say every 10 seconds or something like that. Which is the best way to do this in R? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html