[R] Disregard my previous question

2007-10-12 Thread Leeds, Mark (IED)
I did ?par and it looks switching to mfrow will fix my problem so thanks but disregard my previous message and I apologize for not checking ?par first. I never thought it would be that simple. This is not an offer (or solicitation of an

[R] Plotting question

2007-10-12 Thread Leeds, Mark (IED)
I am constructing plots ( regular not lattice ) and my initial command is par(mar=c(3,4,2,2), mfcol=c(5,2)) and then I create 10 plots on the page. It looks great but the plots on the page go in the order 16 27 38 49 510 Where the numbers denote decile breakdowns. Is there

Re: [R] Addition operation based on specific columns and rows of twodata frames

2007-10-12 Thread Leeds, Mark (IED)
My guess is that there's an easier way but this gives what you want. newY.df-aggregate(Y.df$Counts, list(Y.df[,1],Y.df[,2]), FUN=sum) names(newY.df)-names(X.df) temp.df-merge(newY.df, X.df, by=intersect(names(X.df),names(newY.df)),all=TRUE) almost.df-aggregate(temp.df$Counts,

[R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of like a 2 dimensional array in C. Does someone know if this is

Re: [R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
-Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Thursday, October 11, 2007 4:26 PM To: Andrew Robinson Cc: Leeds, Mark (IED); [EMAIL PROTECTED] Subject: Re: [R] confusion with R syntax Or with x - 1:10 # these are all the same x[2:4][1] (x[2:4])[1] y - x[2:4] y[1

Re: [R] replacing NA's with various numbers

2007-10-05 Thread Leeds, Mark (IED)
x[is.na(x)]- y[is.na(x)] but this will only work correctly if x and y are the same length so I hope that is what you mean by the same style. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 05, 2007 10:28 PM To:

[R] Forcing zero intercept in two predictor case - stat question not R question

2007-10-03 Thread Leeds, Mark \(IED\)
When one is doing simple regression and needs to force a zero intercept ( for whatever reason. I realize it's a controversial issue ), then subtracting the means of the left hand side and the right hand side from themselves does the trick. Does anyone know if there is a similar trick when the

Re: [R] Forcing zero intercept in two predictor case - stat questionnot R question

2007-10-03 Thread Leeds, Mark \(IED\)
Hi john : I just checked it with a simple example before I saw your email and that does work. Thanks and I apologize to you and the list for the question. -Original Message- From: John Fox [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 6:06 PM To: Leeds, Mark (IED) Cc

[R] hypothesis testing

2007-09-24 Thread Leeds, Mark (IED)
This was sent to me by someone on the R-list ( I don't know her ) but I don't have time to look at this right now so I told her I would send it to the R-list because she said it keeps getting bounced when she sends it. #===

Re: [R] how can I attach a variable stored in

2007-09-20 Thread Leeds, Mark (IED)
I don't think I understand your question but John Fox has written a very nice documentat about scoping and environments on his website. It's probably easy to find the site by googling John Fox but, if you can't find it, let me know. As I said, I don't think that I understand your question but,

Re: [R] statistics - hypothesis testing question

2007-09-13 Thread Leeds, Mark (IED)
how one defines better is th real question so I apologize for that. Still, any comments, suggestions are welcome. -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 2:32 PM To: Leeds, Mark (IED) Cc: [EMAIL PROTECTED] Subject: Re: [R

[R] xyplot question

2007-09-11 Thread Leeds, Mark (IED)
I have the code below and it works fine if I print the xyplot but if I take the print out, then I just get a blank pdf. The same holds if I just send the plot to the console without the print ( I get nothing ). My question is whether this is always the case with xyplot or is there something wrong