Re: [R] ?R: Removing white space betwen multiple plots, traditional graphics

2007-07-22 Thread Stephen Tucker
You could try par(mar=c(0,5,0,2), mfrow = c(6,1), oma=c(5,0,2,0)) ##...then, your plots...## --- Mr Natural [EMAIL PROTECTED] wrote: I would appreciate suggestions for removing the white spaces the graphs in a stack: par(mar=c(2,2,1,1), mfrow = c(6,1)) mydates-dates(1:20,origin=c(month

Re: [R] tagging results of apply

2007-07-22 Thread Stephen Tucker
Dear Bruce, In your functions, you need to use your bound variable, 'x' [not mat1] in your anonymous function [function(x)] as the argument to cor(). For instance, you wrote: apply(mat1, 1, function(x) cor(mat1, mat2[1,])) apply(mat1, 1, function(x) cor(mat1, mat2)) They should be apply(mat1, 1,

Re: [R] tagging results of apply

2007-07-22 Thread Stephen Tucker
Actually if you want to tag both column and row, this might also help: ## Give dimension labels to both matrices mat1 - matrix(sample(1:500, 25), ncol = 5, dimnames=list(paste(mat1row,1:5,sep=), paste(mat1col,1:5,sep=))) mat2 - matrix(sample(501:1000, 25), ncol =

[R] Data Set

2007-07-22 Thread amna khan
Hi Sir I have made a data set having 23 stations of rainfall. when I use the attach function to approach indevidual stations then following error occurr. *attach(data)* *S.Sharif#S.Sharif is the station name which has 50 data values* *Error: object S.Sharif not found* Now how to solve this

Re: [R] Data Set

2007-07-22 Thread Gavin Simpson
On Sun, 2007-07-22 at 03:25 -0700, amna khan wrote: Hi Sir I have made a data set having 23 stations of rainfall. when I use the attach function to approach indevidual stations then following error occurr. *attach(data)* *S.Sharif#S.Sharif is the station name which has 50 data values*

[R] Off-topic: simulate time dependent covariates

2007-07-22 Thread Jin Lo
Dear R friends, this is an off-topic question. Could you please point me in ways (e.g., references or even R code) for simulating time varying covariates in a survival analysis setting. Thanks in advance for any responses. yours sincerely, Jin __

[R] create an array with rep

2007-07-22 Thread baptiste Auguié
Hi, I want to make the following array of numbers: -3 -3 -3 -3 -3 -3 -3 -2 -2 -2 -2 -2 -2 -2 ... 3 3 3 3 3 3 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 ... -3 -2 -1 0 1 2 3 (3 would be N, a painful example to type number). Here is my dirty attempt to do it, N-3 x-c(-N:N)

Re: [R] tagging results of apply

2007-07-22 Thread Gabor Grothendieck
You don't need apply at all here. cor can already do that and it automatically labels the rows and columns too. Using the builtin dataset anscombe whose first 4 columns are labelled x1,x2,x3,x4 and whose next 4 columns are labelled y1,y2,y3,y4 we have: cor(anscombe[1:4], anscombe[5:8])

Re: [R] create an array with rep

2007-07-22 Thread Dimitris Rizopoulos
try this: x - -3:3 as.matrix(expand.grid(x, x)) # or t(as.matrix(expand.grid(x, x))) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

Re: [R] create an array with rep

2007-07-22 Thread Gabor Grothendieck
On 7/22/07, Dimitris Rizopoulos [EMAIL PROTECTED] wrote: try this: x - -3:3 as.matrix(expand.grid(x, x)) # or t(as.matrix(expand.grid(x, x))) One minor shortening: t(expand.grid(x, x)) __ R-help@stat.math.ethz.ch mailing list

Re: [R] create an array with rep

2007-07-22 Thread baptiste Auguié
Thank you all! This looks like the fastest solution, N being big and my machine slow I'll go for this one. Thanks, baptiste On 22 Jul 2007, at 12:54, Gavin Simpson wrote: I want to make the following array of numbers: -3 -3 -3 -3 -3 -3 -3 -2 -2 -2 -2 -2 -2 -2 ... 3 3 3 3 3 3 3

Re: [R] Off-topic: simulate time dependent covariates

2007-07-22 Thread Frank E Harrell Jr
Jin Lo wrote: Dear R friends, this is an off-topic question. Could you please point me in ways (e.g., references or even R code) for simulating time varying covariates in a survival analysis setting. Thanks in advance for any responses. yours sincerely, Jin I'm not sure if this

Re: [R] ?R: Removing white space betwen multiple plots, traditional graphics

2007-07-22 Thread Mr Natural
Dear List: Thank you for the several helpful comments on my original post of this title. Most to the point, 1. that from z, who is a coauthor of zoo was very kind. I have spent a morning learning zoo and find it a very cool package. With zoo, one can make very neat time series graphs with a

Re: [R] ?R: Removing white space betwen multiple plots, traditional graphics

2007-07-22 Thread Gabor Grothendieck
On 7/22/07, Mr Natural [EMAIL PROTECTED] wrote: I still have two problems with zoo for my particular application as per the original post of this title. First, my dates are slightly different for each series. Neither of the two suggestions for dealing different-dates-for-different-series

[R] using R for a reaction-time experiment

2007-07-22 Thread Seth Roberts
I want to use R to run a reaction-time experiment: Something appears on the screen, I respond by typing something (one keystroke), the system measures the speed of my response. R would be great for this if only I didn't have to hit Enter to enter that keystroke. I am doing such experiments now

Re: [R] using R for a reaction-time experiment

2007-07-22 Thread Ted Harding
On 22-Jul-07 16:38:02, Seth Roberts wrote: I want to use R to run a reaction-time experiment: Something appears on the screen, I respond by typing something (one keystroke), the system measures the speed of my response. R would be great for this if only I didn't have to hit Enter to enter

Re: [R] using R for a reaction-time experiment

2007-07-22 Thread Seth Roberts
I'm using Windows XP unfortunately. Ted.Harding wrote: On 22-Jul-07 16:38:02, Seth Roberts wrote: I want to use R to run a reaction-time experiment: Something appears on the screen, I respond by typing something (one keystroke), the system measures the speed of my response. R would be

[R] Package design, placement of legacy functions

2007-07-22 Thread William Asquith
I have a function XOLD() from a nearly verbatim port of legacy FORTRAN in a package. I have remplemented this function as XNEW() using much cleaner native R and built-in functions of R. I have switched the package to the XNEW(), but for historical reasons would like to retain the XOLD()

Re: [R] Data Set

2007-07-22 Thread amna khan
Sir the station name S.Sharif exists in the data but still the error is ocurring of being not found. Please help in this regard. On 7/22/07, Gavin Simpson [EMAIL PROTECTED] wrote: On Sun, 2007-07-22 at 03:25 -0700, amna khan wrote: Hi Sir I have made a data set having 23 stations of

[R] Gamma MLE

2007-07-22 Thread rach.s
Hello, I was asked to try the following code on R, gamma.mles function (xx,shape0,rate0) { n- length(xx) xbar- mean(xx) logxbar- mean(log(xx)) theta-c(shape0,rate0) repeat { theta0- theta shape- theta0[1] rate- theta0[2] S- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1) I-

[R] Write columns from within a list to a matrix?

2007-07-22 Thread jrg66
Hello, I think I have a mental block when it comes to working with lists. lapply and sapply appear to do some magical things, but I can't seem to master their usage. As an example, I would like to convert a column within a list to a matrix, with the list element corresponding to the new

Re: [R] Data Set

2007-07-22 Thread Stephen Tucker
Could you post the output from str(data) ? Perhaps that will give us a clue. --- amna khan [EMAIL PROTECTED] wrote: Sir the station name S.Sharif exists in the data but still the error is ocurring of being not found. Please help in this regard. On 7/22/07, Gavin Simpson [EMAIL

Re: [R] using R for a reaction-time experiment

2007-07-22 Thread Ioannis Dimakos
Have you tried DMDX instead of R? And then feed the reaction times collected by DMDX to R for manipulation? IKD === On Κυρ, Ιούλιος 22, 2007 20:55, Seth Roberts wrote: I'm using Windows XP unfortunately. Ted.Harding wrote: On 22-Jul-07 16:38:02, Seth Roberts wrote: I

Re: [R] Write columns from within a list to a matrix?

2007-07-22 Thread Benilton Carvalho
test - lapply(1:3, function(i) cbind(runif(15), rnorm(15,2))) sapply(test, [, 16:30) b On Jul 22, 2007, at 3:39 PM, [EMAIL PROTECTED] wrote: Hello, I think I have a mental block when it comes to working with lists. lapply and sapply appear to do some magical things, but I can't seem

Re: [R] Write columns from within a list to a matrix?

2007-07-22 Thread Benilton Carvalho
oh! and if you want to be less ad-hoc: sapply(test, function(x) x[,2]) b On Jul 22, 2007, at 3:50 PM, Benilton Carvalho wrote: test - lapply(1:3, function(i) cbind(runif(15), rnorm(15,2))) sapply(test, [, 16:30) b On Jul 22, 2007, at 3:39 PM, [EMAIL PROTECTED] wrote: Hello, I think I

Re: [R] Write columns from within a list to a matrix?

2007-07-22 Thread Stephen Tucker
Very close... Actually it's more like savecol2=sapply(test, function(x) x[,1]) to get the same matrix as you showed in your for-loop (did you actually want the first or second column?). when I have multiple complex lists I am trying to manage... for this, you can try mapply() which goes

[R] summary of linear fixed effects model is different than the HSAUR book

2007-07-22 Thread Christopher W. Ryan
Running R 2.5.1 and a newly downloaded lme4 package on WinXP I'm trying to work my way through Everitt and Hothorn's Handbook of Statistical Analyses Using R, c 2006. (No, it's not homework.) Chapter 10 discusses linear mixed effects models for longitudinal data. I've called my long data frame

Re: [R] summary of linear fixed effects model is different than the HSAUR book

2007-07-22 Thread Peter Dalgaard
Christopher W. Ryan wrote: But on page 169, summary() is shown to produce additional columns in the fixed effects section, namely degrees of freedom and the P-value (with significance stars). How can I produce that output? Am I doing something wrong? Has lme4 changed? The latter. To

Re: [R] Data Set

2007-07-22 Thread Gavin Simpson
On Sun, 2007-07-22 at 12:09 -0700, amna khan wrote: Sir the station name S.Sharif exists in the data but still the error is ocurring of being not found. Please help in this regard. If you take the time to do what I asked and actually post the results of typing the following into your R

[R] (no subject)

2007-07-22 Thread Maria Salomé Esteves Cabral
Hi! When I use lmer (lme4 package) it accept the correlation structure like lme or glmmPQL but in the output I have no information about it. Can anyone help me how can I get it. Thanks Salomé __ R-help@stat.math.ethz.ch mailing list

Re: [R] Gamma MLE

2007-07-22 Thread Gavin Simpson
On Sat, 2007-07-21 at 11:36 -0700, rach.s wrote: Hello, I was asked to try the following code on R, I think, if you typed the code below *exactly* as you reproduced it in your email, that you are missing the assignment operator - between gamma.mles and function(xx, shape0, rate0), i.e.:

[R] R and mysql

2007-07-22 Thread along zeng
Hi all, I want to visit MySQL in R use RMySQL package on Windows 2k.I got RMySQL and DBI packages from a cran,but only the package RMySQL is built on MasOS.I extracted both and put them under the folder of library,started R and typed string as , require(RMySQL); R told me DBI was

[R] Conditional logistic regression on n:m matched cohort data

2007-07-22 Thread Robert A. LaBudde
I am designing an interlaboratory validation study for a presence/absence alternative method test kit vs. a presence/absence reference method test kit. There will be 10 laboratories conducting tests using both methods. In each laboratory, there will be 5 specimens tested, each of the 5

[R] Conditional logistic regression on n:m matched cohort data [Corrected]

2007-07-22 Thread Robert A. LaBudde
[Corrected the model formula to include method.] I am designing an interlaboratory validation study for a presence/absence alternative method test kit vs. a presence/absence reference method test kit. There will be 10 laboratories conducting tests using both methods. In each laboratory, there

Re: [R] R and mysql

2007-07-22 Thread Gabor Grothendieck
To run with R 2.5.1 you need the Windows binary of RMySQL 0.6-0 but I don't think that that is available on either CRAN or BioConductor currently. however, one does exist and I suggest you contact the maintainer, David James or the r-sig-db list. If those don't get it for you send me an email off

[R] text labels on a dendrogram

2007-07-22 Thread Ana Marcela Florez Rueda
Hi I've made a dendogram but I cannot label with text that I have on one of the columns of the data, anyone can help me thanks Ana [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] Data Set

2007-07-22 Thread Stephen Tucker
It turns out that - and (space) are not valid variable names. You can get around that in two ways: == names(Monsoon)[2] - S.Sharif names(Monsoon)[8] - Islamabad.AP attach(Monsoon) S.Sharif Islamabad.AP detach(Monsoon) and do the same for other variable names that contain - or

[R] maths characters in labels ylab padding

2007-07-22 Thread Murray Pung
I have checked out the help files, but cannot find details on how to use maths characters in ylab. Instead of m^2, I would like the 2 in superscript, if possible. I would also like to place more padding on the label so that the label is not obscured by the horizontal numbers. y - 1:10 x -

[R] Error using Rd2dvi on OSX

2007-07-22 Thread Gattuso, Jean-Pierre
Hi, I run R 2.5.1 on Mac OS 10.4.10 and fail to build a package manual. Below is the transcript. The problem is a pdflatex: command not found error but I think that I have a fully working latex install (installed with iInstaller) as I use TeXShop with no problem. Could someone help?

Re: [R] Error using Rd2dvi on OSX

2007-07-22 Thread Prof Brian Ripley
Please use R-sig-mac for questions about MacOS X. pdflatex is not in your path, if it is installed. As makeindex appears to be in your path, I suspect that pdflatex is not installed. R CMD Rd2dvi man will use latex rather than pdflatex, and will help confirm this. On Mon, 23 Jul 2007,