Re: [R] cartograms in R?

2006-05-28 Thread Robert W. Baer, Ph.D.
Dan E. Kelley writes: Q: Has anyone implemented cartograms [**] in R? A search on the R site turned up https://stat.ethz.ch/pipermail/r-sig-geo/2005-December/000698.html --snip-- and for some elegant examples for election results, see http://www-personal.umich.edu/~mejn/election I don't

Re: [R] cartograms in R?

2006-05-28 Thread Robert W. Baer, Ph.D.
Dan E. Kelley writes: Q: Has anyone implemented cartograms [**] in R? A search on the R site turned up https://stat.ethz.ch/pipermail/r-sig-geo/2005-December/000698.html --snip-- and for some elegant examples for election results, see http://www-personal.umich.edu/~mejn/election I

[R] example(plot) question

2006-01-14 Thread Robert W. Baer, Ph.D.
From Windows RGui, I tried: example(plot) This worked as expected except that the various plots write over top of each other in the graphics window that is created. I then discovered that graphics history is not enabled during the example generation. I used the graphics window menu to

Re: [R] How to produce this graphic

2006-01-04 Thread Robert W. Baer, Ph.D.
- Original Message - From: Kort, Eric Lisa Wang asks... Subject: [R] How to produce this graphic Hello there, I would like to produce a plot of x-c(4,5,6),which is the mean of each group and y-c('groupA','groupB','groupC'). plot (x,y) can not produce any graphics because y is not

Re: [R] A comment about R:

2006-01-04 Thread Robert W. Baer, Ph.D.
On Wed, 4 Jan 2006, Roger Bivand wrote: Could I ask for comments on: source(url(http://spatial.nhh.no/R/etc/capabilities.R;), echo=TRUE) as a reproduction of the Stata capabilities session? Both the t test and the chi-square from our side point up oddities. I didn't succeed on

Re: [R] Could anyone help me reshape this wide data intolongitudinal one? Thanks

2004-11-28 Thread Robert W. Baer, Ph.D.
This might get you started: # make data in original format a=matrix(1:48,12,4) colnames(a)-c('var1','var2','var3','var4') rownames(a)-c('a1','a2','a3','b1','b2','b3','c1','c2','c3','d1','d2','d3') a #rehape the data a=data.frame(a) reshape(a[1:4],idvar=row,

Re: [R] Coplot Given text

2004-11-26 Thread Robert W. Baer, Ph.D.
Does this do what you want? coplot(myvar~myvar | myvar, show.given=FALSE, ylab=, xlab=c(...,A Title on Top)) Rob - Original Message - From: Mihai Nica [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 26, 2004 11:30 AM Subject: [R] Coplot Given text Greetings: I am

[R] Installing gregmisc under windows 2000

2004-11-24 Thread Robert W. Baer, Ph.D.
I went through the following steps using RGUI menus to install gregmisc from CRAN. It appears to install but at the end R does not seem to be able to find it. Any idea what I'm doing wrong? Thankjs, Rob local({a - CRAN.packages() +

Re: [R] Installing gregmisc under windows 2000

2004-11-24 Thread Robert W. Baer, Ph.D.
not clarify the interaction with the RGUI install procedure for me. Thanks again. Rob - - Original Message - From: Peter Dalgaard [EMAIL PROTECTED] To: Robert W. Baer, Ph.D. [EMAIL PROTECTED] Cc: R-Help [EMAIL PROTECTED] Sent: Wednesday, November 24

Re: [R] confidence interval of a average...

2004-11-24 Thread Robert W. Baer, Ph.D.
It depends on whether you want to do 95% ocnfidence intervals on the predicition or the mean vital capacity. Try the following and see if it gets you started: #Simulate data height=48:72 vc=height*10+20*rnorm(72-48+1) # Do regression lm.vc=lm(vc~height) # Confidence interval on mean vc

Re: [R] confidence interval of a average...

2004-11-24 Thread Robert W. Baer, Ph.D.
Sorry. The last code line got destroyed by my emailer and should read: matlines(height,predict.lm(lm.vc,interval=p), + lty=c(1,3,3),col=c('black','red','red')) - Original Message - From: Robert W. Baer, Ph.D. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 4

Re: [R] confidence interval of a average...

2004-11-24 Thread Robert W. Baer, Ph.D.
Sorry if this was not clear. This is more of a theoreticla question rather than a R-coding question. I need to calculate The predicted response and 95% prediction interval for a man of average height So I need to predict the average response, which is easily done by taking the mean height

Re: [R] Matrix/Table col headings R 2.0.0

2004-10-21 Thread Robert W. Baer, Ph.D.
Uwe Ligges [EMAIL PROTECTED] writes: Somehow PD got right justified columns with this dataset. Is there a new way of doing things in version 2.0.0, my ignorance, a bug? I tried making the columns factors first, but in my hands this did not appear to help either. Thanks for any insight.

[R] Matrix/Table col headings R 2.0.0

2004-10-19 Thread Robert W. Baer, Ph.D.
month10 day 04 language R ___ Robert W. Baer, Ph.D. Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St. Kirksville, MO 63501-1497 USA [[alternative HTML version deleted

Re: [R] reading Systat into R

2004-10-08 Thread Robert W. Baer, Ph.D.
The SPSS *.SAV file, when I opened it, proved not to have any data in it. It only contained the variable view not the data view. But the Excel file appears to contain the data. My experience with getting spss files suggests that you might actually be seeing the file as a list. Look at help

Re: [R] cell counting in R

2004-08-13 Thread Robert W. Baer, Ph.D.
You might find it easier to do this type of thing with an open-source image analysis program such as ImageJ: http://rsb.info.nih.gov/ij/ Rob - Original Message - From: Doug Bourne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:10 PM Subject: [R] cell counting

Re: [R] cor and missing values. Bug?

2004-05-26 Thread Robert W. Baer, Ph.D.
Not to put too fine a point on it, but did you consider checking the NEWS file for the most recent version (1.9.0, http://cran.r-project.org/src/base/NEWS)? o The cor() function did not remove missing values in the non-Pearson case. There is still something a little strange

Re: [R] bars with sd

2004-05-23 Thread Robert W. Baer, Ph.D.
You want to read the help ?segments. Try the following to get the barplots: ymean=c(1.25,2.65,3.45) ysd=c(0.35,0.65,0.50) xpos=barplot(ymean,ylim=c(0,max(ymean)+max(ysd)),col='yellow') segments(xpos,ymean-ysd,xpos,ymean+ysd) HTH, Rob Baer - Original Message - From: Matteo Vidali

Re: [R] Isotopic notation in plots

2004-05-18 Thread Robert W. Baer, Ph.D.
From: Christophe Declercq [EMAIL PROTECTED] Try: plot(1:10,xlab=expression(phantom(0)^{14}*C)) Just out of interest, how do I find out what phantom(0) does? I tried both ?phantom and help.search(phantom) without getting any hits, and yet the expression posed above creates a leading blank

Re: [R] results from t-test

2004-05-01 Thread Robert W. Baer, Ph.D.
All the numeric output looks OK, but the statement that the alternative hypothesis is accepted seems rather strange. I think you misread it. It says alternative hypothesis: true mean is not equal to 0 which should be read as alternative hypothesis: true mean is not equal to 0 not

Re: [R] Debug problem

2004-04-20 Thread Robert W. Baer, Ph.D.
P.S. Here is just the input if you want to try it yourself by copying and pasting into an R session: If you are using Windows RGUI and you haven't noticed the new Paste commands only in the Edit menu of R1.9.0, check it out. It is a fantastic time saver. Rob

Re: [R] t.test formatting question

2004-04-16 Thread Robert W. Baer, Ph.D.
How about: as.numeric(t.test(rnorm(12))[[1]]) - Original Message - From: Chuck Cleland [EMAIL PROTECTED] To: christopher ciotti [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 16, 2004 6:25 PM Subject: Re: [R] t.test formatting question Sorry, I should have checked

Re: [R] fractal calculation using fdim

2004-04-12 Thread Robert W. Baer, Ph.D.
Well I must say that I am still struggling to understand exactly how fdim works, and what form the first argument is to take. Presumably the function produces something like 1-slope for a log log plot as a fractal dimension. I guess it is really the makeline() function I don't understand from the

Re: [R] Seeking help for outomating regression (over columns) andstoring selected output

2004-04-03 Thread Robert W. Baer, Ph.D.
Here's one simplistic solution, perhaps there are better ones: # Make some test data and place in dataframe x1=rnorm(20) x2=rnorm(20) x3=rnorm(20) x4=as.factor(sample(c(G1,G2,G3),20,replace=T)) y1=2*x1+4*x2+0.5*x3+as.numeric(x4)+rnorm(20) df=data.frame(y1,x1,x2,x3,x4) # Now create the ouput

Re: [R] Extending a vector

2004-04-02 Thread Robert W. Baer, Ph.D.
Marko, Looks fine to me. Why do you think the syntax is incorrect? Works for me in 1.8 on Windows. I have a function I repeatably call which takes input parameters and outputs columns to various data frames. Looks fine to me although it is not completely clear that your request for column and

[R] dots in function names

2004-03-23 Thread Robert W. Baer, Ph.D.
In a (off-list) response to a question of frequency polygons, Dr Paul Murrell writes: There's an ann arg which you can use to turn off the default labels (ann=FALSE). Have you seen help(plot.default) as well as help(plot)? Thank you again, Paul. Interestingly, the ?plot help contains no

Re: [R] spearman rank correlation problem

2004-03-16 Thread Robert W. Baer, Ph.D.
Martin Maechler writes: It seems that this needs to be documented, since you are right, the1 - 6 S(d^2) / (n^3 - n)( d = r1 - r2 ; r{12} := rank(x{12}) ) formula is also in use as *definition* for Spearman's rank correlation. Since this topic is here... Although I seen the above

[R] Frequency ploygon help

2004-03-07 Thread Robert W. Baer, Ph.D.
I can't figure out how to get the x-axis to contain the category lables for my frequency polygon. I'm also not sure if there is a more elegant approach. Any insights on the labels? I tried this: #generate some pseudo data x=c(sort(sample(1:1500,5)),sort(sample(1:1500,3),dec=T)) # assign names

Re: [R] Excel files

2004-03-07 Thread Robert W. Baer, Ph.D.
This might get you started on reading and plotting the dates and times for levels of a gender factor: # I assume the following Excel data date time Sex Value 1 5/5/1999 10:00:00 male 14.987685 2 7/3/1998 20:00:00 female 17.667527 3 8/6/1999 3:23:00 male 3.428401 4 12/7/1997 6:36:00 male 14.977503

Re: [R] Statistiques avec R

2004-03-05 Thread Robert W. Baer, Ph.D.
On Fri, 5 Mar 2004 09:09:19 - Simon Fear [EMAIL PROTECTED] wrote: How great is the demand? I was a translator before I became a statistician but I think this would be a massive undertaking ... In the version of the site at: http://zoonek2.free.fr/UNIX/48_R/all.html , the author makes

Re: [R] get.hist.quote - is great, but am I missing something?

2004-03-03 Thread Robert W. Baer, Ph.D.
I guess I'm not understanding the object that get.hist.quote makes. In general, what are R facilities for discovering what a given object is? I suggest, you study first one of the beginners manuals of the R environment: http://cran.r-project.org/manuals.html Then you would easily see that,

Re: [R] superimposing two scatterplots

2004-03-02 Thread Robert W. Baer, Ph.D.
Look at: ?plot ?points - Original Message - From: Raphael Schoenle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 01, 2004 4:35 PM Subject: [R] superimposing two scatterplots Hi, How can I plot two scatterplots on the same, one panel? I have two times series (price data

Re: [R] Scanning tab-separated numbers

2004-03-01 Thread Robert W. Baer, Ph.D.
The problem would seem to be that the Windows GUI does not accept the TAB key as input. There is no whitespace between your values to be recongnized. Take your sequesnce and save it as a tab separated file in Excel or through Notepad, and you will be able to scan it in just fine using

[R] read.spss defaults

2004-02-25 Thread Robert W. Baer, Ph.D.
The read.spss parameter defaults are: use.value.labels=TRUE, to.data.frame=FALSE, Is there some reasoning other than historical for this choice? In most instances, it seems that the opposite default choice (use.value.labels=FALSE, to.data.frame=TRUE,) would better preserve any existing

Re: [R] RE:Including R plots in a Microsoft Word document

2004-02-21 Thread Robert W. Baer, Ph.D.
For documentation type: ?win.metafile It is in the base package with the following layout: win.metafile(filename = , width = 7, height = 7, pointsize = 12) Rob - Original Message - From: Fulvio Copex [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday,

Re: [R] read.table with spaces

2004-02-20 Thread Robert W. Baer, Ph.D.
You should make your missing value indicator something other than your separator indicator: 1. Use a text editor to indicate all missing values as NA or 2. Use a text editor to replace the 3 separator spaces with, for example, a comma or semicolon and use the argument sep=, or sep=; which

[R] Digital Image Processing

2004-02-13 Thread Robert W. Baer, Ph.D.
I have seen several posts (but few answers) in R-help search as to whether there are any packages that use R to process digital images. There are several categories related to the general type of problem that are useful to know about: -- Any existing packages for taking a digital image format

Re: [R] creating a factor

2004-02-03 Thread Robert W. Baer, Ph.D.
Hi list, I'd like to make a factor with seven 1s and three 2s using the factor() function. That is, 1 1 1 1 1 1 1 2 2 2 I will then bind this factor to the matrix below using cbind.data.frame(). 0.56 0.48 0.22 0.59 0.32 0.64 0.26 0.60 0.25 0.38 0.24 0.45 0.56 0.67 0.78