Re: [R] Creating different matrices in a loop

2007-06-24 Thread Patrick Burns
Except the list should be initialized to the final length: smat - vector(list, length(counts)) Growing objects is a major source of the inefficient use of memory. If the memory grows enough it becomes a large impact on execution time. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696

Re: [R] Highliting a text in a plot

2007-06-24 Thread David Barron
How about this: hilight - function(x,y,s, bg=yellow) { text.width - strwidth(s) text.height - strheight(s) rect(x,y,x+text.width,y+text.height,col=bg,border=NA) text(x,y,s,adj=c(0,0)) } plot(1:10,1:10,type=b) hilight(4,4,Point) On 23/06/07, Maja Schröter [EMAIL PROTECTED]

Re: [R] warning in a loop

2007-06-24 Thread Mike Meredith
You can investigate what's gone wrong after the loop has failed by looking at the values of i, k, p, and t. Although d[(d[,(i+1)]%in%1),1] produces a vector, k has only one element. Same with p. Should then be obvious why the t.test produces an error. The problem is with the [i] index for k and

Re: [R] Names of objects passed as ... to a function?

2007-06-24 Thread Gavin Simpson
On Sat, 2007-06-23 at 16:52 +0100, Prof Brian Ripley wrote: On Sat, 23 Jun 2007, Gavin Simpson wrote: Dear list, I have a function whose first argument is '...'. Each element of '...' is a data frame, and there will be at least 2 data frames in '...'. The function processes each of

[R] plot just one page of lattice plot

2007-06-24 Thread Felix Andrews
Great stuff, thanks. I'm copying this solution to R-help for reference. On 6/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 6/23/07, Felix Andrews [EMAIL PROTECTED] wrote: Hi Deepayan, I have a Lattice question: is there any way to plot just one (specified) page of a multi-page

Re: [R] Encircling a text in a plot

2007-06-24 Thread Jim Lemon
Maja Schröter wrote: Hello everyone, I want to write something in a plot with text or something similar, e.g. text(x,y,something) but I want to encircle it by a box as in a legend. I have absolutely no idea how this could work. Hi Maja, Have a look at boxed.labels and textbox in the

Re: [R] Setting up a blank table with column names in the hard drive

2007-06-24 Thread Duncan Murdoch
On 23/06/2007 7:51 PM, Yuchen Luo wrote: Dear Professor Murdoch. Thank you so much! Your help is highly appreciated! Please send replies to the mailing list. When I use the following commands, there is a blank cell before title name in the resulting csv (excel) file. I am wondering how to

Re: [R] About Memory size

2007-06-24 Thread Patrick Burns
Uwe Ligges wrote: ... RAM is cheap and thinking hurts. ... Surely a fortune. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) __ R-help@stat.math.ethz.ch

[R] Fitting a model to a test set

2007-06-24 Thread Des Callaghan
Dear Forum members, I have created a quasi-poisson model from a training dataset and now wish to use the model to estimate y values for a test dataset, in order to validate the model. The trouble is I can't figure out how to estimate y values for the test set using the model derived from the

Re: [R] @ Mike warning in a loop

2007-06-24 Thread Tavpritesh
Hi Mike, Thanks for the help, but I want to conduct tests, not between column 1 2 of the data but between the values of column two itself which have been categorized into 3 classes, and indexed in column 1 as 1,2 and 3. Also if you could help me with the commands for ANOVA for the same purpose,

[R] adding lines to stripchart

2007-06-24 Thread James Root
I have two points of collection across 20 subjects (pre and post for each), so 20 pairs of data points. I would like to plot the actual raw data points for each subject for both pre and post and connect lines between these two points (20 in all) to depict real change between the two timepoints.

Re: [R] Fitting a model to a test set

2007-06-24 Thread Kuhn, Max
Des, Please provide some information (like the results of sessionInfo) and example code for your model. Did you use gee to fit the model and with what function? If could be that you need to examine the type argument of the predict function to make sure that you are getting the scale that you are

[R] ANOVA non-sphericity test and corrections (eg, Greenhouse-Geisser)

2007-06-24 Thread DarrenWeber
I'm an experimental psychologist and when I run ANOVA analysis in SPSS, I normally ask for a test of non-sphericity (Box's M-test). I also ask for output of the corrections for non-sphericity, such as Greenhouse-Geisser and Huhn-Feldt. These tests and correction factors are commonly used in the

[R] Half of a heatmap

2007-06-24 Thread Rosenfeld, Jeffrey
I am trying to produce a heatmap of pairwise correlations, but since the matrix is symmetric, I only need either the upper or the lower triangle. I have scoured the web and R documentation, but I have not been able to find a way to produce such a figure. Is there a simple way to produce a

Re: [R] adding lines to stripchart

2007-06-24 Thread Chuck Cleland
James Root wrote: I have two points of collection across 20 subjects (pre and post for each), so 20 pairs of data points. I would like to plot the actual raw data points for each subject for both pre and post and connect lines between these two points (20 in all) to depict real change between

[R] JRI and Axis Web Service

2007-06-24 Thread Yifan (Eric) Jiang
Hi all, It is my first time to use the R-help mailing list and doesn't have too much R acknowledge. The reason that I am writing this email is looking for helps of using JRI in Java Axis Web Service. Well, I am not quite sure if this is the right place to ask this kind of questions, but I

[R] Matrix multiplication (with multidimensional array)

2007-06-24 Thread Tong Wang
Hi All, I am wondering if there is an efficient way to do the following matrix multiplication, a[1,,] 1, 2 3, 4 a[2,,] 4, 3 2, 1 b[1,,]5,6 7,8 b[2,,]8,7 6,5 I need the result c, with c[1,,] =

[R] R-2.5.0 compilation problem on Linux powerpc

2007-06-24 Thread Vivek Menon
Hello everybody,I am having an error while compiling R-2.5.0 on Linux powerpc. This is what I see when I do a make: gcc -std=gnu99 -shared -L/usr/local/lib -o grDevices.so chull.o devNull.o devPicTeX.o devPS.o devQuartz.o init.o ../../../../library/grDevices/libs/grDevices.so is unchanged

[R] Source code for rlogis

2007-06-24 Thread Anup Nandialath
Dear friends, I was trying to read the source code for rlogis but ran into a roadblock. It shows [[1]] function (n, location = 0, scale = 1) .Internal(rlogis(n, location, scale)) environment: namespace:stats Is is possible to access the source code for the same. Sincerely Anup