[R] X11 PNG Error

2008-12-29 Thread Harsh
Hi All, I am running R 2.6.0 on an Ubuntu 8.04 with Rserve on a machine. I send R commands from a Windows computer to the R machine and a few commands require the creation of plots on png devices. I often get the following error: Error in X11(paste(png::, filename, sep = ), width, height,

Re: [R] X11 PNG Error

2008-12-29 Thread Prof Brian Ripley
1) Please follow the posting guide: a later version of R will solve this. 2) Please read ?png in the version you have: it describes how you need write access on a running X server, and how to use Xvfb to get this if neccessary. On Mon, 29 Dec 2008, Harsh wrote: Hi All, I am running R 2.6.0

[R] Function to find the order of operation

2008-12-29 Thread megh
Is there any R function find the order of an operation? I am looking for a general R function to find for example how many basic operations (i.e. addition, multiplication and exponentiation) are performed when two square matrices are multiplied. Regards, -- View this message in context:

Re: [R] cox regression warning/error messages

2008-12-29 Thread Terry Therneau
1. I haven't seen that particular message before, so it is difficult to comment. 2. To go further, you will need to provide a reproducable example, i.e., some code/data that I could run to get the same error. 3. One note cox.NV - coxph(Surv(recidivism$intDaysUntilFNVPO,

Re: [R] Random coefficients model with a covariate: coxme function

2008-12-29 Thread Terry Therneau
I'm new to R and am trying to fit a mixed model Cox regression model with coxme function. I have one two-level factor (treat) and one covariate (covar) and 32 different groups (centers). I'd like to fit a random coefficients model, with treat and covar as fixed factors and a random

[R] q about memory usage progression

2008-12-29 Thread Juliet Hannah
I monitored the usage of memory on a script that I ran. It ran 30K regressions and it stores p-values for one of the coefficients. It read in a file that has 3000 rows and about 30K columns. The size of the file is about 170 MB. My understanding is that memory usage started out at 2.2G and went

[R] stress value remains so high(metaMDS)

2008-12-29 Thread Wu Chen
metaMDS(cm, distance = euclidean, k = 2, trymax = 50, autotransform =TRUE, trace = 1, plot = T) (cm is a similarity matrix, in which values are positive integers or 0) I use this command to run NMDS on my matrix cm. But the stress is very high after analysis. About 14. Actually, there is

[R] Merge or combine data frames with missing columns

2008-12-29 Thread Mark Heckmann
Hi R-experts, suppose I have a list with containing data frame elements: [[1]] (Intercept) y1 y2 y3 y4 -6.64 0.761 0.383 0.775 0.163 [[2]] (Intercept) y2 y3 -3.858 0.854 0.834

[R] Array Making

2008-12-29 Thread ykank
Dear R Users Suppose I've certain values of A[1], A[2], A[3] ,A[4].B[1],B[2],B[3]..C[1],C[2],C[3].so on..All A,B,Cs are some numeric constant. I want to make an array which will look like [A[1], B[1], C[1], A[2], B[2], C[2], A[3], B[3] ,C[3] Please suggest me any way to do

[R] How to get unique solution from nnet function

2008-12-29 Thread Utkarsh Singhal
Hi R, I am using nnet function of nnet package to fit neural networks. Now I want to get a unique solution every time I run the function for the same data. If I give rang=0, it solves my problem but I am not sure whether I am doing the right thing. Any comments are welcome. Thank you,

Re: [R] Array Making

2008-12-29 Thread Greg Snow
Is this what you mean: x - 1:5 y - 11:15 z - 21:25 c(rbind(x,y,z)) [1] 1 11 21 2 12 22 3 13 23 4 14 24 5 15 25 Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

[R] How to cluster the elements of a binary vector

2008-12-29 Thread mauede
I would appreciate some suggestions with clustering the rows of a binary matrix. Basically given a binary vector (a generic row from matrix Bb) which contains an unknown number of 1s mixed with 0s, the problem is to define clusters according to the vague and incomplete description given in a

[R] Hmisc labels and captions in latex.list()

2008-12-29 Thread J Michael Dean
I am trying to feed a list to latex to use with SWeave, and the list comes from contents(). Since it is a list, a caption and label are generated by latex.list - these are not overridden by setting the parameters (such as caption='myCaption', label='myLabel'). I must clearly be missing

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
Mark, I think ?rbind should work for you. Regards, Brian -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mark Heckmann Sent: Monday, December 29, 2008 9:18 AM To: r-help@r-project.org Subject: [R] Merge or combine data frames

Re: [R] q about memory usage progression

2008-12-29 Thread Juliet Hannah
One more note. In case it is helpful, I am including the code for my loop: # data is read in numSNPs - ncol(myData); pvalues - rep(-1,numSNPs); names(pvalues) - colnames(myData); for (SNPnum in 1:numSNPs) { is.na(pvalues[SNPnum]) - TRUE; try({ fit.yags -

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Charles C. Berry
On Mon, 29 Dec 2008, Mark Heckmann wrote: Hi R-experts, suppose I have a list with containing data frame elements: [[1]] (Intercept) y1 y2 y3 y4 -6.64 0.761 0.383 0.775 0.163 [[2]] (Intercept) y2 y3 -3.858

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Lauri Nikkinen
How about this solution g1 - data.frame(ic = 1, y1 = 2, y2 = 3, y3 = 4, y4 = 5) g2 - data.frame(ic = 2, y2 = 6, y3 = 7) g - list(g1, g2) library(gregmisc) do.call(smartbind, g) -Lauri __ R-help@r-project.org mailing list

Re: [R] Array Making

2008-12-29 Thread Stavros Macrakis
How about c(rbind(A,B,C)) a-1:5 b-11:15 c-21:25 rbind(a,b,c) [,1] [,2] [,3] [,4] [,5] a12345 b 11 12 13 14 15 c 21 22 23 24 25 c(rbind(a,b,c)) [1] 1 11 21 2 12 22 3 13 23 4 14 24 5 15 25 On Mon, Dec 29, 2008 at 4:01 AM, ykank

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Henrique Dallazuanna
Try this: do.call(rbind, lapply(l, [, unique(unlist(sapply(l, names) Where l is your list. On Mon, Dec 29, 2008 at 12:18 PM, Mark Heckmann mark.heckm...@gmx.dewrote: Hi R-experts, suppose I have a list with containing data frame elements: [[1]] (Intercept) y1 y2

[R] dudas

2008-12-29 Thread Juan Antonio Gil Pascual
Quería saber si existe alguna función de R para realizar el algoritmo CHAID de árbol de clasificación, existen de J48 por ejemplo pero no encuentro nada de este algorítmo. Muchas gracias y un cordial saludo, Juan -- = Juan Antonio Gil

[R] Tinn R

2008-12-29 Thread Sarah E. McCormick
Hi, I just got a new computer with windows vista on it and I am having a problem using Tinn R. The problem occurs when I select a chunk of code and try to run it all at once using the R send:selection (echo = TRUE) button, I get this error: Error in source(.trPaths[5], echo = TRUE,

[R] Trouble installing plyr

2008-12-29 Thread Andrew Choens
I want to learn how to use the reshape package. The reshape package is not included in the Ubuntu repositories, so I attempted to install reshape with: install.packages(reshape) This is what I got for output: Warning in install.packages(reshape) : argument 'lib' is missing:

Re: [R] how to plot implicit functions

2008-12-29 Thread Duncan Murdoch
YIHSU CHEN wrote: Dear R users -- I think this question was asked before but there was no reply to it. I would appreciate any suggestion any of you might have. I am interested in plotting several implicit functions (F(x,y,z)=0) on the same fig. Is there anyone who has an example code of

[R] How to step through a demo

2008-12-29 Thread Ron Burns
I have just started to learn R on linux in an X-terminal command line environment at the R prompt . When I try to run a demo it just races through all the steps and graphics leaving me with only the last few commands and results in the terminal window and a window with the last graphic. Is

Re: [R] Is there some way to append to a pdf after its device has been closed?

2008-12-29 Thread jim holtman
Why don't you just output all the plot to a single file by opening 'pdf', doing the plots, 'dev.off()'. Why do you need so many files open? On Mon, Dec 29, 2008 at 2:57 PM, Alex Pine alex.p...@nyu.edu wrote: Hello all, My question has to do with writing to pdf/ps files. Currently, my R

Re: [R] Is there some way to append to a pdf after its device has been closed?

2008-12-29 Thread Stephan Kolassa
Hi Alex, you can have R execute OS commands using system(), perhaps you can call pdfmerge that way. Or (admittedly less elegantly), you can use LaTeX with the pdfpages package, either using Sweave or system(pdflatex ...). Good luck, Stephan Alex Pine schrieb: Hello all, My question has

Re: [R] How to step through a demo

2008-12-29 Thread Prof Brian Ripley
See ?devAskNewPage On Mon, 29 Dec 2008, Ron Burns wrote: I have just started to learn R on linux in an X-terminal command line environment at the R prompt . When I try to run a demo it just races through all the steps and graphics leaving me with only the last few commands and results in

[R] Fitting weighted polynomial regression model

2008-12-29 Thread cruz
Hi, I have a simple question but I just couldn't find the right way to do it after 3 hours of hacking and google. How do I fit a weighted polynomial regression model to my plot? This is what I got so far: lines(loess(A~B + I(B^2),weights=1/B^2)) Error in xy.coords(x, y) : 'x' and 'y' lengths

Re: [R] How to step through a demo

2008-12-29 Thread Spencer Graves
Dear Prof. Ripley: Thanks for this. What would need to happen to get this added to see also in the demo help page? Thanks again, Spencer Graves Prof Brian Ripley wrote: See ?devAskNewPage On Mon, 29 Dec 2008, Ron Burns wrote: I have just started to learn R on linux

Re: [R] How to step through a demo

2008-12-29 Thread Duncan Murdoch
On 29/12/2008 5:13 PM, Spencer Graves wrote: Dear Prof. Ripley: Thanks for this. What would need to happen to get this added to see also in the demo help page? You need to convince a member of the R core team to add it. Doing that is easiest if you do all the work: figure

[R] is rodbc truncating long strings...

2008-12-29 Thread Jeff Hamann
I'm sorry to have to post a note here, but I can't seem to get around a problem I'm having. I've got a database that contains fields (not memo fields) that are very long strings and when I use RODBC, they get truncated... which is bad... I can verify that all of the string is in the database

[R] Normal Curve

2008-12-29 Thread AbouEl-Makarim Aboueissa
Dear ALL: How I show the area under the normal curve for example for the following example: Assume X has N(100,15). How to show the area corresponding to the probability: P(90X110) With many thanks Abou == AbouEl-Makarim Aboueissa, Ph.D. Assistant

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Mark Heckmann
thanks for the elegant solution! It worked out fine in my case, but when I tried to understand what it does I discovered one little issue. l - list(data.frame(a=1, b=2), data.frame(a=2, c=3)) do.call(rbind, lapply(l, [, unique(unlist(sapply(l, names) will not work. Neither the following

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread hadley wickham
Or even more simply: On Mon, Dec 29, 2008 at 12:17 PM, Henrique Dallazuanna www...@gmail.com wrote: Try this: do.call(rbind, lapply(l, [, unique(unlist(sapply(l, names) Where l is your list. Or even more simply: library(plyr) do.call(rbind.fill, l) which doesn't get the variable order

Re: [R] Normal Curve

2008-12-29 Thread Jorge Ivan Velez
Dear AbouEl-Makarim, Take a look at this: http://finzi.psych.upenn.edu/R/library/PASWR/html/normarea.html HTH, Jorge On Mon, Dec 29, 2008 at 4:25 PM, AbouEl-Makarim Aboueissa aabouei...@usm.maine.edu wrote: Dear ALL: How I show the area under the normal curve for example for the

Re: [R] Is there some way to append to a pdf after its device has been closed?

2008-12-29 Thread Patrick Connolly
On Mon, 29-Dec-2008 at 02:57PM -0500, Alex Pine wrote: | Hello all, | | My question has to do with writing to pdf/ps files. Currently, my R | program requires 100+ pdf devices to be open, which is over the | limit of 64 devices that can be open at the same time, causing R to | throw an

[R] why stress value remains so high after invoking of metaMDS

2008-12-29 Thread Wu Chen
Hello everyone! metaMDS(cm, distance = euclidean, k = 2, trymax = 50, autotransform =TRUE,trace = 1, plot = T) (cm is a similarity matrix, in which values are positive integers or 0) I use this command to run NMDS on my matrix cm. But the stress is very high after analysis. About 14.