Re: [R] Changing font in boxplots

2007-08-08 Thread Robert Baer
Hi John, Thanks so much for such a quick reply. I have tried to set all to Times font running par(font.lab=6) (not 4, maybe this is a local setting on my machine?) but now the boxplot shown has the x and y labels in Times New Roman and the x and y axis still in Arial. Any idea why R is

[R] dataframe layout

2007-03-14 Thread Robert Baer
Can someone remind me how to change the columns in df.a into a two column df.b that contains one column of data and another column of the original column headings as levels. Example: a=1:3 b=4:6 c=7:9 df.a=data.frame(a,b,c) Should become in df.b: dat lev 1 a 2 a 3 a 4 b 5

Re: [R] R for copying and pasting selected image files?

2007-03-12 Thread Robert Baer
You don't tell us your OS, but the system() command should let you use your OS to copy/move files on most OSs. see ?system Other commands that might be helpful for this job are: ?setwd ?getwd ?dir - Original Message - From: Kim Milferstedt [EMAIL PROTECTED] To:

Re: [R] Examples on how to READ/WRITE to database using R-Project

2007-02-21 Thread Robert Baer
We are working on a project on forecast modeling and would like to know if there are any examples on how to READ/WRITE to a database (e.g. PostgreSQL) using R-Project. I do have a sample R Script which takes input as files from a directory and writes back output files to a directory. I

Re: [R] simpleR or usingR package by Verzani

2007-02-15 Thread Robert Baer
I think the name of what you want is simple.freqpoly() Try: library(UsingR) ?simple.freqpoly HTH, Rob Baer I am a new R user and so I thought I could start with Using R for Introductory statistics by Verzani. In order to use some of the functions and datasets I have to install the simpleR

Re: [R] axis command and excel time format

2006-11-10 Thread Robert Baer
You should look at ?plot.default ?times You need to supply an x vector (time) along with a y value vector of the same length. Your error message tells you that you vectors were not of equal length. You are repeatedly supplying different length vectors. times() takes a text vector and

Re: [R] axis command and excel time format

2006-11-08 Thread Robert Baer
Carmen, Gabor has already given you the detail you ask for, but might try the following plot to see what is going wrong: plot(times(tt), x, type='l') This does not give you the EXACT control of the axis you asked for, but this simple plot command gives you a fairly nice result. It

[R] unexpected read.csv behavior

2006-10-23 Thread Robert Baer
Example data in a recent post was: LandFill Ruminants United States (USA) .214280 5528.16 France 200.527083 1299.87 Australia185.878368 2448.17 Russian Federation 1752.833400 2024.29 Argentina283.987320 2567.02 Brazil

Re: [R] Labels for Points- 2 character labels?

2006-10-18 Thread Robert Baer
I think you want to use text() x=1:15; y=16:30 plot(x,y) text(x,y, as.character(x), pos=4) - Original Message - From: ableape [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Wednesday, October 18, 2006 4:59 PM Subject: [R] Labels for Points- 2 character labels? I would like to

Re: [R] frequency table

2006-09-21 Thread Robert Baer
Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St. Kirksville, MO 63501-1497 USA - Original Message - z = rep(c(M,F),c(50,60)) How can I get the following frequency table:

Re: [R] how to construct stripchart with coincident points centered

2006-09-08 Thread Robert Baer
You may be looking for: stripchart(y, method=jitter, pch=o, vertical=TRUE,jitter=.5) Rob Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St. Kirksville, MO 63501-1497 USA - Original

Re: [R] I am surprised (and a little irritated)

2006-04-19 Thread Robert Baer
Detlef Steuer [EMAIL PROTECTED]write: I`m the one to blame for the readme :-) and for providing the rpms. If you encounter such big problems my readme sucks. But I'm open for critisism and will improve on the current situation for the release of R-2.3.0 next monday. Even as you sit under

Re: [R] R, RMysql, and MySQL 5 Decimal Type Support

2006-03-28 Thread Robert Baer
Whenever I have a MySQL query that returns a Decimal result to R I get the following warning in R: I get this for a simple query like SELECT 2, 2.5 !! Warning message: RS-DBI driver warning: (unrecognized MySQL field type 246 in column 1) If I understand what you are saying, I think you

Re: [R] How to use: library lattice: barchart

2006-03-21 Thread Robert Baer
it looks totaly different and I get the error message: x should be numeric in: bwplot.formula(x = ayield ~ avariety | asite, data = list(ayield = c(2, --- cbind(some numeric and not numeric columns) gives you all columns to be character and when you make data.frame from it

Re: [R] Surv object in data.frame

2006-03-15 Thread Robert Baer
This does work: coxph(survobj~group, data=df.test[[1]]) # this works like your original To get insight compare: str(survobj) str(df.test) str(df.test[[1]]) Then note the 2nd sentence of the following from ?coxph Arguments: formula: a formula object, with the response on the left of a '~'

Re: [R] 2 barplots in the same graph

2006-02-22 Thread Robert Baer
See ?barplot If I understand what you want, try: barplot(x1,border=red,density=0) par(new=TRUE) barplot(x2,border=green,density=0) Rob Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St.

Re: [R] print formula on plot

2006-02-08 Thread Robert Baer
Only put the expression inside the expression? plot(x,z[3]*x^2+z[2]*x+z[3],type=l, main=My nice plot) text(-0.9,5,paste(zs[1],' ',expression(x^3))) # should work Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health

Re: [R] Newbie question on using friedman.test()

2006-01-17 Thread Robert Baer
?friedman.test Says: Description: Performs a Friedman rank sum test with unreplicated blocked data. Usage: friedman.test(y, ...) y: either a numeric vector of data values, or a data matrix. So assuming your data, d, is unreplicated blocked data, perhaps d=as.matrix(d) friedman.test(d) or

Re: [R] ylim problem in barplot

2006-01-05 Thread Robert Baer
PaulB When I use barplot but select a ylim value greater PaulB than zero, the graph is distorted. The bars extend PaulB below the bottom of the graph. PaulB For instance the command produces a problematic graph. PaulB barplot(c(200,300,250,350),ylim=c(150,400)) Well, my

Re: [R] forrest plot

2005-10-20 Thread Robert Baer
Try: metaplot(mn=c(-0.28174,-0.71444,-0.12375,-0.12426,-0.30011,-0.45058,-0.07324 ),se=c(0.20766,0.42691,0.26366,0.30357,0.31819,0.28636,0.37758),xlab=HR and 95%CI,logeffect=T,xaxt=n,xlim=c(-1.7,1.7)) axis(side=1,at=c(0.2,0.3,0.6,1.0,1.4,2.0,3.0,5.4),labels=c(0.2,0.3,0.6,1.0,1 4,2.0,3.0,5.4))

Re: [R] Dunn's post hoc test

2005-10-17 Thread Robert Baer
I think Martin told you the basic approach to the indexing: averank-sort(sample(1:100,25,replace=TRUE)) averank[-1] - averank[-length(averank)] [1] 1 1 6 3 4 14 1 1 8 1 2 6 5 4 10 0 3 2 1 11 1 1 2 0 averank [1] 4 5 6 12 15 19 33 34 35 43 44 46 52 57 61 71 71 74 76 77 88

Re: [R] Dunn's post hoc test

2005-10-17 Thread Robert Baer
I think I misunderstood your follow-up question. Try this: averank-sort(sample(1:100,10,replace=TRUE)) x=matrix(nrow=length(averank),ncol=length(averank)) for (i in 1:length(averank)){ + for (j in 1:length(averank)){ + x[i,j] - averank[i] - averank[j] + }} x [,1] [,2] [,3] [,4] [,5]

Re: [R] Getting eps into Word documents.

2005-10-04 Thread Robert Baer
On 03-Oct-05 Marc Schwartz (via MN) wrote: On Mon, 2005-10-03 at 16:31 -0300, Rolf Turner wrote: A student in one of my courses has asked me about getting R graphics output (under Linux) into a Word document. I.e. she wants to do her R thing under Linux, but then do her word

Re: [R] Problem with tick marks in lines.survfit (package survival)

2005-09-19 Thread Robert Baer
How about: plot(fit, mark.time=TRUE, xscale=365.24,xlab='Years', ylab='Survival',lwd=c(2,1)) Rob - Original Message - From: Rachel Pearce [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Monday, September 19, 2005 4:59 AM Subject: [R] Problem with tick marks in lines.survfit (package

Re: [R] The Perils of PowerPoint

2005-09-02 Thread Robert Baer
The R relevance here might be that all the statistics in the world wrongly applied to data will only bury its information content...R and Powerpoint (and Matlab and Perl and...) are all terrific tools for turning data into knowledge, but tools DO NOT relieve us of the necessity of thinking