Re: [R] testing slope
Hi, in order to avoid the parameter of x:v3 to be estimated, you can re-formulate the model. You fitted y~1+x+v2+v3+x:v2+x:v3 with 6 df Now you would fit y~0+v1+v2+v3+x:v1+x:v2) with 5 df as x:v3 is not included in the model, i.e. the parameter x:v3 is constrained to be zero. best, vito A toy example is following: x-1:100 #explanatory continuous variable f-factor(rep(1:3,length=100)) #categorical variable f-model.matrix(~f-1) xx-f*x X-cbind(f,xx) #design matrix colnames(X)[4:6]-c(xf1,xf2,xf3) b-c(2,5,-3,-2,3,0) #parameters y-X%*%b+rnorm(100,0,1) #response m0-lm(y~0+X) #full model m1-lm(y~0+X[,-6]) #reduced model anova(m0,m1) #test for nonnull slope - Original Message - From: Ronaldo Reis Jr. [EMAIL PROTECTED] To: R-Help [EMAIL PROTECTED] Sent: Tuesday, February 04, 2003 8:50 PM Subject: [R] testing slope Hi all, I try to test a linear slope using offset. I have: m2 - glm(Y~X*V) summary(m2) Call: glm(formula = Y ~ X * V) Deviance Residuals: Min1QMedian3Q Max -2.01688 -0.56028 0.05224 0.53213 3.60216 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 1.3673 0.8476 1.613 0.119788 X 4.0235 0.1366 29.453 2e-16 *** Vn2 0.9683 1.1987 0.808 0.427131 Vn3 4.6043 1.1987 3.841 0.000787 *** X:Vn2 4.1108 0.1932 21.279 2e-16 *** X:Vn3-4.0069 0.1932 -20.740 2e-16 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 (Dispersion parameter for gaussian family taken to be 1.53955) Null deviance: 15303.977 on 29 degrees of freedom Residual deviance:36.949 on 24 degrees of freedom AIC: 105.39 Number of Fisher Scoring iterations: 2 It is clear that X slope is diferent of Zero. X 4.0235 0.1366 29.453 2e-16 *** It is too clear that X:Vn2's slope is diferent of X's slope and diferent of Zero, because is greater than X'slope. X:Vn2 4.1108 0.1932 21.279 2e-16 *** But, the X:Vn3' slope is different of X'slope, but not necessarily different of Zero. How I make to introduce this parameter in a new model for test? An offset only with Vn3 slope??? I try: m2 - glm(Y~V*offset(0*X)) m2 - glm(Y~X*V+V*offset(0*X)) m2 - glm(Y~V:X+V*offset(0*X)) but neither work :(( Thanks for all. Ronaldo -- If you live in a country run by committee, be on the committee. -- Graham Summer -- | //|\\ [*][***] || ( õ õ ) [Ronaldo Reis Júnior ][PentiumIII-600 ] | V [ESALQ/USP-Entomologia, CP-09 ][HD: 30 + 10 Gb ] || / l \ [13418-900 Piracicaba - SP][RAM: 128 Mb] | /(lin)\ [Fone: 19-429-4199 r.229 ][Video: SiS620-8Mb ] ||/(linux)\ [[EMAIL PROTECTED] ][Modem: Pctel-onboar] |/ (linux) \[ICQ#: 5692561][Kernel: 2.4.18 ] || ( x ) [*][***] ||| _/ \_Powered by Gnu/Debian Woody D+:) | Lxuser#: 205366 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] big ps-files
To R-users I have been using R for many years and I am very happy with it. One thing puzzles me. Graphic postscript files tend to become quite big, much bigger than corresponding splus postscript files. Does anybody have a hint to avoid this? best regards Helgi -- Helgi Tomasson FAX: 354-552-6806 University of IcelandPHONE:354-525-4571 Faculty of Economics and Business Administration email:[EMAIL PROTECTED] Oddi v/ Sturlugotu IS-101 Reykjavik ICELAND [[alternate HTML version deleted]] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] big ps-files
Why does it matter? Surely the time taken to read the file or send it to the printer is not important, and the actual files compress well for storage (about a factor of 6 with bzip2 on the example I tried). Which version of S-PLUS, which has had two completely separate postscript drivers? The ATT S version was written in the 1980s when this did matter and is somewhat optimized for compact code. I've just done a quick comparison on the MASS4 ch05 script using Linux. S-PLUS 6.1 produces 212Kb, R 1.6.2 produces 596Kb. These compressed to 48 and 108Kb respectively. On Wed, 5 Feb 2003, Helgi Tomasson wrote: I have been using R for many years and I am very happy with it. One thing puzzles me. Graphic postscript files tend to become quite big, much bigger than corresponding splus postscript files. Does anybody have a hint to avoid 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 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] tcltk installation problem
Dear all, I want to use GraspeR (on R 1.6.0) and have to install tcltk library. When I try to do this, I get back this error message: Error in firstlib(which.lib.loc, package) : TCL_LIBRARY is not set Error in library(pkg, character.only = TRUE) : .First.lib failed But I have a tcl/tk package (Active TCL 8.4.1.0) correctly install on my PC (Win95) and in the autoexec.bat the path for bin and lib . So where am I wrong?? Thanks for advance. With very best regards, Erik. Erik-André SAULEAU SEAIM Hôpital du Hasenrain BP 1070 87, Avenue de Altkirch 68051 MULHOUSE Cédex Tel: 03-89-64-79-95 Fax: 03-89-64-79-71 Mél: [EMAIL PROTECTED] Web: http://www.ch-mulhouse.fr Afin d'éviter toute propagation de virus informatique, et en complément des dispositifs en place, ce message (et ses pièces jointes s'il y en a) a été automatiquement analysé par un antivirus de messagerie. *** __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk installation problem
You have to install the previous version of Active Tcl/Tk : 8.3.5.0. A.S. |+| |Alessandro Semeria |Tel. +39 544 536811 | |+| |Models and Simulation Laboratory|Fax. +39 544 538663 | |+| |The Environment Research Center - || |Montecatini (Edison Group),Via || |Ciro Menotti 48,|E-mail: [EMAIL PROTECTED] | |48023 Marina di Ravenna (RA), Italy || |+| __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk installation problem
SAULEAU Erik-André wrote: Dear all, I want to use GraspeR (on R 1.6.0) and have to install tcltk library. When I try to do this, I get back this error message: Error in firstlib(which.lib.loc, package) : TCL_LIBRARY is not set Error in library(pkg, character.only = TRUE) : .First.lib failed But I have a tcl/tk package (Active TCL 8.4.1.0) correctly install on my PC (Win95) and in the autoexec.bat the path for bin and lib . So where am I wrong?? Thanks for advance. With very best regards, Erik See the R for Windows FAQ 3.6 Package TclTk does not work. (I guess you are on Windows) Uwe Ligges __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] UltraEdit syntax highlighting
Jason Fisher wrote: Hello everyone... I was curious if anyone had an UltraEdit (syntax highlighting) wordfile for R. The UltraEdit webpage previously made available an R wordfile on their webpage, however, it is no longer posted. I have just asked the UltraEdit webmaster, and he does not know why that file disappeared. Anyway, he asked me to resubmit it... Does someone have it? Best, Philippe Grosjean ...](({°...°}))... ) ) ) ) ) ( ( ( ( ( Dr. Philippe Grosjean ) ) ) ) ) ( ( ( ( ( LOV, UMR 7093 ) ) ) ) ) Station Zoologique ( ( ( ( ( Observatoire Océanologique ) ) ) ) ) BP 28 ( ( ( ( ( 06234 Villefranche sur mer cedex ) ) ) ) ) France ( ( ( ( ( ) ) ) ) ) tel: +33.4.93.76.38.16, fax: +33.4.93.76.38.34 ( ( ( ( ( ) ) ) ) ) e-mail: [EMAIL PROTECTED] ( ( ( ( ( SciViews project coordinator (http://www.sciviews.org) ) ) ) ) ) ... __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] big ps-files
Helgi Tomasson wrote: To R-users I have been using R for many years and I am very happy with it. One thing puzzles me. Graphic postscript files tend to become quite big, much bigger than corresponding splus postscript files. Does anybody have a hint to avoid this? best regards Helgi If you are using Unix/Linux, the command `eps2eps' (ghostscript) can help to reduce the size of the eps files. -- Helgi Tomasson FAX: 354-552-6806 University of IcelandPHONE:354-525-4571 Faculty of Economics and Business Administration email:[EMAIL PROTECTED] Oddi v/ Sturlugotu IS-101 Reykjavik ICELAND -- Cyril __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] attr function
attr(attr(b, terms), term.labels) works, as I would have expected. This is part of the terms attribute, not of the model frame per se. On Wed, 5 Feb 2003, Shawn Way wrote: I've been trying unsuccessfully to extract the term labels from a model frame using the attr function. The code is as follows a - data.frame(col1=c(1,2,3,2,1,3),col2=c(2,4,7,6,4,3)) b - model.frame(col2~col1,data=a) Now the term.labels attribute is col1, but how do I get this from the b data frame attributes? -- 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 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] simplify a data frame
Dear all, For the past three hours I have tried simplify a data frame. I would be really happy if someone could help solving this, I'm sure simple, problem. I want to aggregate the data frame: ObjektIDBalteNummer Baltessegment S.13S.13.1 S.13.1.2 S.13S.13.1 S.13.1.3 S.13S.13.2 S.13.2.1 S.13S.13.2 S.13.2.2 S.13S.13.2 S.13.2.3 S.13S.13.3 S.13.3.6 S.13S.13.3 S.13.3.7 S.13S.13.3 S.13.3.8 S.13S.13.3 S.13.3.9 so that the results look likte this: ObjektIDBalteNummer S.13S.13.1 S.13S.13.2 S.13S.13.3 There are in fact many ObjektID. Thanks in advance! Sincerely Tord --- Tord Snäll Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University Villavägen 14 SE-752 36 Uppsala, Sweden Tel: 018-471 28 82 (int +46 18 471 28 82) (work) Tel: 018-25 71 33 (int +46 18 25 71 33) (home) Fax: 018-55 34 19 (int +46 18 55 34 19) (work) E-mail: [EMAIL PROTECTED] Check this: http://www.vaxtbio.uu.se/resfold/snall.htm! __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Package: cluster -- plot.partition() change title: main=
Dear R-list members, I am using the cluster package and by the generation of plot.partition I ran into the problem that an alternative title overlaps the default title. plot.partition(clara.14,which.plot=2,stand=TRUE, main=Silhouette plot of 14 clusters) The manual states that all optional arguments for clusplot.default may also be supplied to plot.partition(). Altering the title in clusplot() works. Question: What am I doing wrong and what would be the correct way to insert the graphic title Silhouette plot of 14 clusters alone? I am using R 1.61 on Windows NT and the latest available cluster package from CRAN. Many thks in advance. Rgds, Bernhard -- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] barplot default colors
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Liaw, Andy Sent: Wednesday, February 05, 2003 7:00 AM To: '[EMAIL PROTECTED]' Subject: [R] barplot default colors Dear R-help, Can some one explain why barplot() uses changing colors in the bars by default? I should think that most of the time when people draw barplots, they want the bars to be in the same color. (At least that's what I'd expect. The first time I used barplot() in R, I was shocked to see the colors.) As an example, one example in ?layout draws a scatterplot with histograms drawn on the margins. The histograms were drawn by barplot(), and, IMHO, look rather hideous in the colors. Regards, Andy Andy I. Liaw, PhD Biometrics Research Phone: (732) 594-0820 Merck Co., Inc. Fax: (732) 594-1565 P.O. Box 2000, RY84-16Rahway, NJ 07065 mailto:[EMAIL PROTECTED] Andy, This is an extrapolation beyond known data by me, but I would suspect that one plausible reason is that since barplot can do grouped bars and stacked bars, the original author decided to set a single default multiple color vector for all cases. This would be one approach rather than checking to see what type of barplot was being drawn and using a single color for the scenario you are using or a multiple color vector for grouped/stacked bars. It is obviously easy enough to add 'col = color' to the barplot() arguments to use a single color of your choosing or an alternate multiple color vector. To change the default behavior now would likely break other code in use. My two cents Regards, Marc Schwartz __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] barplot default colors
On Wed, 5 Feb 2003, Liaw, Andy wrote: Can some one explain why barplot() uses changing colors in the bars by default? I should think that most of the time when people draw barplots, they want the bars to be in the same color. (At least that's what I'd expect. The first time I used barplot() in R, I was shocked to see the colors.) As an example, one example in ?layout draws a scatterplot with histograms drawn on the margins. The histograms were drawn by barplot(), and, IMHO, look rather hideous in the colors. The changing colours are useful when the data are a matrix (so that you have bars either stacked or in groups). You can easily get a single color, eg data(VADeaths) barplot(VADeaths, beside=TRUE, col=thistle) The colours themselves are definitely not ideal. As Paul Murrell said at the beginning of his talk on colour at last year' JSM The only word for this is `embarassing'. Better colour palettes are in the works, eg see the RColorBrewer package. -thomas __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R as a `script'
The feature will hopefully be available in 1.7.0. I have done some work on this thanks to some code provided by Neil McKay. It is become slightly more complex as we try to also explore different startup techniques, and get it tested on all of the different platforms. But, hopefully by 1.7.0. Havard Rue wrote: is there any way i can use R as a tool for scripts in unix, as wotan[hrue]$ cat example.R #!/usr/bin/R x=1 havard -- Havard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice: +47-7359-3533URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help -- ___ Duncan Temple Lang[EMAIL PROTECTED] Bell Labs, Lucent Technologiesoffice: (908)582-3217 700 Mountain Avenue, Room 2C-259 fax:(908)582-3340 Murray Hill, NJ 07974-2070 http://cm.bell-labs.com/stat/duncan __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R as a `script'
On Wed, 5 Feb 2003, Jonathan Baron wrote: On 02/05/03 14:30, Havard Rue wrote: is there any way i can use R as a tool for scripts in unix, as wotan[hrue]$ cat example.R #!/usr/bin/R x=1 havard What I do - explained in the R man page - is R example.R example.out and I have found it useful (for some reason I can't recall) to use the --vanilla option in these cases: R --vanilla example.R example.out It's useful because it won't work otherwise -- you need --save, --no-save or --vanilla. You can also send small amounts of R code into stdin directly. For example, a shell script Sweave.sh to run Sweave can be written as #!/bin/sh R --vanilla SweaveSh.R /dev/null $1 with SweaveSh.R being library(tools) Sweave(commandArgs()[3]) or more elegantly in a single file as #!/bin/sh echo library(tools);Sweave('$1') | /usr/local/bin/R --vanilla --silent (the first is mine, the second is from Fritz Leisch). -thomas __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] R 1.6 crashes if ² in object displayed on console
Dear R-help, Under Win98se, the mere presence of this character, ² (Alt+0178), causes R 1.6 to crash, but only when it is in an object displayed to the console. x-² #no problem x R crashes with Illegal operation message graham lawrence __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] RE: [R] R 1.6 crashes if ² in object displayed on console
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Dirk Eddelbuettel Sent: Wednesday, February 05, 2003 2:29 PM To: graham lawrence; [EMAIL PROTECTED] Subject: Re: [R] R 1.6 crashes if ² in object displayed on console graham lawrence wrote: Under Win98se, the mere presence of this character, ² (Alt+0178), causes R 1.6 to crash, but only when it is in an object displayed to the console. x-² #no problem x R crashes with Illegal operation message Well, there never was R 1.6. Do you use 1.6.0, 1.6.1 or 1.6.2? For what's it worth, R 1.6.2 on NT4 is happy to show ALT+0178. Dirk The same using 1.6.2 under WinXP: x - ² x [1] ² No crash. HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] testing slope
For testing the hypothesis Beta[X] + Beta[Vn3] + Beta[X:Vn3] = 0 you can use the estimable function from the gregmisc package: estimable(m2, c(Intercept=0, X=1, Vn2=0, Vn3=1, X:Vn2=0, X:Vn3=1) ) See the estimable help page for details. -Greg -Original Message- From: Ronaldo Reis Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 2:51 PM To: R-Help Subject: [R] testing slope Hi all, I try to test a linear slope using offset. I have: m2 - glm(Y~X*V) summary(m2) Call: glm(formula = Y ~ X * V) Deviance Residuals: Min1QMedian3Q Max -2.01688 -0.56028 0.05224 0.53213 3.60216 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 1.3673 0.8476 1.613 0.119788 X 4.0235 0.1366 29.453 2e-16 *** Vn2 0.9683 1.1987 0.808 0.427131 Vn3 4.6043 1.1987 3.841 0.000787 *** X:Vn2 4.1108 0.1932 21.279 2e-16 *** X:Vn3-4.0069 0.1932 -20.740 2e-16 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 (Dispersion parameter for gaussian family taken to be 1.53955) Null deviance: 15303.977 on 29 degrees of freedom Residual deviance:36.949 on 24 degrees of freedom AIC: 105.39 Number of Fisher Scoring iterations: 2 It is clear that X slope is diferent of Zero. X 4.0235 0.1366 29.453 2e-16 *** It is too clear that X:Vn2's slope is diferent of X's slope and diferent of Zero, because is greater than X'slope. X:Vn2 4.1108 0.1932 21.279 2e-16 *** But, the X:Vn3' slope is different of X'slope, but not necessarily different of Zero. How I make to introduce this parameter in a new model for test? An offset only with Vn3 slope??? I try: m2 - glm(Y~V*offset(0*X)) m2 - glm(Y~X*V+V*offset(0*X)) m2 - glm(Y~V:X+V*offset(0*X)) but neither work :(( Thanks for all. Ronaldo -- If you live in a country run by committee, be on the committee. -- Graham Summer -- | //|\\ [*][***] || ( õ õ ) [Ronaldo Reis Júnior ][PentiumIII-600 ] | V [ESALQ/USP-Entomologia, CP-09 ][HD: 30 + 10 Gb ] || / l \ [13418-900 Piracicaba - SP][RAM: 128 Mb] | /(lin)\ [Fone: 19-429-4199 r.229 ][Video: SiS620-8Mb ] ||/(linux)\ [[EMAIL PROTECTED] ][Modem: Pctel-onboar] |/ (linux) \[ICQ#: 5692561][Kernel: 2.4.18 ] || ( x ) [*][***] ||| _/ \_Powered by Gnu/Debian Woody D+:) | Lxuser#: 205366 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] clustering and stratification
Hello, Does R have any capabilities (or are there any add on packages) which can do estimation of standard statistical models (means, regression, logistic regression, etc) which take into account not only weights (e.g. post-stratification weights) but also the sample design, such as stratification and clustering information (to compute a robust taylor linearized variance estimator, for example)? Thanks much for any input, Jason ___ Jason C. Bond, Ph.D. Biostatistician, Associate Scientist Public Health Institute Alcohol Research Group 2000 Hearst Avenue Berkeley, CA 94709 Telephone: (510) 642-7965 Fax: (510) 642-7175 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] postscript: can't center plot
One of our color postscript printers needs a slightly larger margin than the default, so I'm trying to send slightly smaller graphics to it, but all the extra margin I provide ends up at the right and bottom of the page. These are the relevant (I imagine) ps.options: $paper [1] special $width [1] 10 $height [1] 8 $pagecentre [1] TRUE I tried this on two systems, in two versions of R, and the output is identical. linux: R 1.6.1 (2002-11-01) mips-sgi-irix6.5: R 1.6.1 Beta (2002-10-28) I'll attach a postscript file, which is very simple but I think shows the asymmetry I'm talking about. I'll file a bug report if I should, but I thought I'd give y'all a chance to confirm the behavior or tell me I'm going about this all wrong. Debby lestat.ps Description: PostScript document
Re: [R] R as a `script'
While on the subject of scripts... Can someone suggest a strategy for plotting something in an X11 window with R in a Unix script, such that the plot window will persist after the script exits? i.e.: #!/bin/sh R --slave --vanilla EOF X11() plot something do something to preserve the image q() EOF -- - Pierre Kleiber Email: [EMAIL PROTECTED] Fishery Biologist Tel: 808 983-5399/737-7544 NOAA FISHERIES - Honolulu Laboratory Fax: 808 983-2902 2570 Dole St., Honolulu, HI 96822-2396 - __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] commandArgs() prints warnings to STDOUT
Dear R-Users, I was glad to hear that there is an ongoing work to make R more easily runnable as a batch. I'd like to raise two issues in this regards: 1. commandArgs() prints warnings to STDOUT rather than to STDERR, see example below $ cat foo.R argv - commandArgs() $ R --no-save --no-restore --silent A foo.R 2 /dev/null ARGUMENT 'A' __ignored__ argv - commandArgs() 2. It should be possible to turn off echoing of R commands, the '' lines above. Please let me know if it is already there. Thanks, Vadim -- DISCLAIMER \ This e-mail, and any attachments thereto, is intend ... [[dropped]] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Re: [R] RE: [R] R 1.6 crashes if ² in object displayed on console
No problem on a Mac running X11 (the best platform ;) [David-Orlovichs-Computer:~] orlovich% /usr/local/bin/R R : Copyright 2003, The R Development Core Team Version 1.6.2 Patched (2003-01-23) snip x-² x [1] ² On Thursday, February 6, 2003, at 09:50 AM, Marc Schwartz wrote: x-² #no problem __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] clustering and stratification
On Wed, 05 Feb 2003 13:50:06 -0800 Jason Bond [EMAIL PROTECTED] wrote: Hello, Does R have any capabilities (or are there any add on packages) which can do estimation of standard statistical models (means, regression, logistic regression, etc) which take into account not only weights (e.g. post-stratification weights) but also the sample design, such as stratification and clustering information (to compute a robust taylor linearized variance estimator, for example)? Thanks much for any input, Jason ___ Jason C. Bond, Ph.D. Biostatistician, Associate Scientist Public Health Institute Alcohol Research Group 2000 Hearst Avenue Berkeley, CA 94709 Telephone:(510) 642-7965 Fax: (510) 642-7175 For ols, logistic, accelerated failure time, and Cox models you can do cluster adjustments using either the robcov (Huber-White-Efron methods) or bootcov (cluster bootstrap) functions in the Design library. See http://hesweb1.med.virginia.edu/biostat/s/Design.html Doing this as the same time as using weights may not be supported by the functions. -- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Re: [R] RE: [R] R 1.6 crashes if ² in object displayed on console
This is covered in the rw-FAQ, and is a bug in some (obselete and unsupported by Microsoft) versions of Windows. On Thu, 6 Feb 2003, David Orlovich wrote: No problem on a Mac running X11 (the best platform ;) The comparison should be with MacOS ca 1995, which I think runs neither R nor X11. [David-Orlovichs-Computer:~] orlovich% /usr/local/bin/R R : Copyright 2003, The R Development Core Team Version 1.6.2 Patched (2003-01-23) snip x-² x [1] ² On Thursday, February 6, 2003, at 09:50 AM, Marc Schwartz wrote: x-² #no problem __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help -- 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 __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R as a `script'
In R 1.6.2 you can do this if you start the script with #! /path/to/r_home/lib/R/bin/R.bin provided that you first define the environment variables R_HOME and LD_LIBRARY_PATH as they are defined in the R shell script (/usr/bin/R in your case). I've only tested this running on Sun Solaris. I can't claim to have done extensive testing for pitfalls (i.e., pitfalls that aren't obvious to me!). -Don At 2:30 PM +0100 2/5/03, Havard Rue wrote: is there any way i can use R as a tool for scripts in unix, as wotan[hrue]$ cat example.R #!/usr/bin/R x=1 havard -- Havard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice: +47-7359-3533URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA -- __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] commandArgs() prints warnings to STDOUT - correction
I realized that it is not commandArgs() rather R itslef that prints the warning to the stdout (which is still not desirable of course): $ R --no-save --no-restore --silent A /dev/null 2 /dev/null ARGUMENT 'A' __ignored__ ===original message below Dear R-Users, I was glad to hear that there is an ongoing work to make R more easily runnable as a batch. I'd like to raise two issues in this regards: 1. commandArgs() prints warnings to STDOUT rather than to STDERR, see example below $ cat foo.R argv - commandArgs() $ R --no-save --no-restore --silent A foo.R 2 /dev/null ARGUMENT 'A' __ignored__ argv - commandArgs() 2. It should be possible to turn off echoing of R commands, the '' lines above. Please let me know if it is already there. Thanks, Vadim -- DISCLAIMER \ This e-mail, and any attachments thereto, is intend ... [[dropped]] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] clustering and stratification
On Wed, 5 Feb 2003, Jason Bond wrote: Hello, Does R have any capabilities (or are there any add on packages) which can do estimation of standard statistical models (means, regression, logistic regression, etc) which take into account not only weights (e.g. post-stratification weights) but also the sample design, such as stratification and clustering information (to compute a robust taylor linearized variance estimator, for example)? Thanks much for any input, The new `survey' package does this for means, tables, glm and cox models. It would be pretty easy to add support for the parametric survival models if there were any demand. It incorporates weights, stratification, clustering, and the finite population correction to variance if desired. -thomas __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] .Rprofile, .Rfirst, and .Rdata
Hi all, After a short hiatus away from R I have found that it's changed a bit. I used to keep a definition of .First in .Rprofile that did a couple of things on startup (load a couple of libraries). Now, I've discovered that when I change the definition of .First in .Rprofile it doesn't change anything when I start up, because .First is held over in .Rdata from the last session. The manual states that now .Rdata is loaded last, as intended. My question is, how do I change what's in .First (or any other variable, for that matter), if .Rdata will always override my changes? (I'd prefer not to have to do it manually, and I'd prefer to have all the other data preserved, rather than just leaving out .Rdata) Dave R. __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Call C routine problem
When I call C function from Splus, I often meet this problem: Problem: Couldn't find a function definition for Stest My c function is saved as 'test.c' (the function is also named as 'test' My splus function is saved as 'Stest', such as Stest - function(d,f) { .C(test, as.integer(d), as.single(f)) } Assume my files (test.c and Stest) have been stored in the directory ''work'' I have done the following steps in this directory: (1) Splus CHAPTER test.c (2) Splus make (3) Splus (4) d-10 f-rep(0,d) result-Stest(d,f) then the error message is : Problem: Couldn't find a function definition for Stest What am I wrong??? Thank you for your help in advance!!! __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] About STEM Plot in R
Hey Does anybody know if R can plot the 3-dimensinal stem graphs? In Matlab, there is such similare function to plot 3D plots, stem3(X,Y, Z), where X, Y , Z (column vectors) are coordinate values of data points. Thanks. Fred __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] .Rprofile, .Rfirst, and .Rdata
On Wednesday, February 5, 2003, at 09:30 PM, Henrik Bengtsson wrote: What do you have in .First() that you can not have directly in the .Rprofile script? For example: Nothing that I can think of, but it's the principle of the thing. If i did have a reason to change .First, how would I do it ? More generally, suppose I want to ensure a variable is set to a certain value in .Rprofile, how can I be sure that R.data won't overwrite it? It just seems like loading .Rdata after .Rprofile makes it difficult to change things easily. # ~/.Rprofile cat(Running my .Rprofile...); library(modreg) cat(Running my .Rprofile...done); Henrik Bengtsson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of David Richmond Sent: den 6 februari 2003 13:57 To: [EMAIL PROTECTED] Subject: [R] .Rprofile, .Rfirst, and .Rdata Hi all, After a short hiatus away from R I have found that it's changed a bit. I used to keep a definition of .First in .Rprofile that did a couple of things on startup (load a couple of libraries). Now, I've discovered that when I change the definition of .First in .Rprofile it doesn't change anything when I start up, because .First is held over in .Rdata from the last session. The manual states that now .Rdata is loaded last, as intended. My question is, how do I change what's in .First (or any other variable, for that matter), if .Rdata will always override my changes? (I'd prefer not to have to do it manually, and I'd prefer to have all the other data preserved, rather than just leaving out .Rdata) Dave R. __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/ r-help __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help