Re: [R] bigglm() results different from glm()+Another question

2009-07-09 Thread utkarshsinghal
That was definitely helpful. if you change your seq to: seq(chunksize, 1-chunksize, chunksize) then you won't get the error messages Even previously, I was not getting any error messages or warnings at all, i.e., update removes the extra NA rows silently, for example: set.seed(1) xx =

Re: [R] Extracting a column name in loop?

2009-07-09 Thread Moshe Olshansky
If df is your dataframe then names(df) contains the column names and so names(df)[i] is the name of i-th column. --- On Thu, 9/7/09, mister_bluesman mister_blues...@hotmail.com wrote: From: mister_bluesman mister_blues...@hotmail.com Subject: [R] Extracting a column name in loop? To:

[R] Cuminc Plot

2009-07-09 Thread kende jan
Dear All, here is the example for cumulative incidence analysis with cmprsk package: set.seed(2) ss - rexp(100) gg - factor(sample(1:3,100,replace=TRUE),1:3,c('a','b','c')) cc - sample(0:2,100,replace=TRUE) strt - sample(1:2,100,replace=TRUE) print(xx - cuminc(ss,cc,gg,strt))

[R] Node colors in pvclust

2009-07-09 Thread nyk
Is there a way to assign color to nodes as with hclust/as.dendrogram/dendrapply when using pvclust? The problem is that as.dendrogram isn't working on the pvclust objects. library(pvclust) pvc - pvclust(matrix, nboot=1000) plot(pvc) -- View this message in context:

Re: [R] print() to file?

2009-07-09 Thread Moshe Olshansky
One possibility is to use sink (see ?sink). --- On Thu, 9/7/09, Steve Jaffe sja...@riskspan.com wrote: From: Steve Jaffe sja...@riskspan.com Subject: [R] print() to file? To: r-help@r-project.org Received: Thursday, 9 July, 2009, 5:03 AM I'd like to write some objects (eg arrays) to a

Re: [R] error: no such index at level 2

2009-07-09 Thread Petr PIKAL
Hi Godmar Back god...@gmail.com napsal dne 08.07.2009 15:28:50: On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17: Hi, I am confused about how to select elements from a list. I'm trying to

Re: [R] Mysteriously vanishing LD_LIBRARY_PATH

2009-07-09 Thread Patrick Connolly
On Wed, 08-Jul-2009 at 09:40PM -0500, Marc Schwartz wrote: [] When I was using Fedora, several years ago I started to add any paths that I needed for LD_LIBRARY_PATH into /etc/ld.so.conf. Then run 'sudo ldconfig' to update the configuration. Since I don't have root access to the CentOS

Re: [R] Best way to export values from a function?

2009-07-09 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 09.07.2009 02:57:33: On Wed, Jul 8, 2009 at 8:34 PM, Jason Rupertjasonkrup...@yahoo.com wrote: Maybe there is a great website out there or white paper that discusses this but again my Google skills (or lack there of) let me down. Yeah, R is

[R] IIA test

2009-07-09 Thread justin bem
Dear all, I'am using mlogit to test IIA hypothesis. I'get the test statistique who is negative, a p-value of 1, and a text saying that the IIA hypothesis is rejeted. Does a negative value mean that constraint model is more efficient that that the full model ? what to do in this case ?

Re: [R] heatmap.2: question regarding the raw z-score

2009-07-09 Thread Chrysanthi A.
Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores and not the intensities of the gene

[R] r bug (?) display of data

2009-07-09 Thread Marc Jekel
Hi R Fans, I stumbled across a strange (I think) bug in R 2.9.1. I have read in a data file with 5934 rows and 9 columns with the commands: daten = data.frame(read.table(C:/fussball.dat,header=TRUE)) Then I needed a subset of the data file: newd = daten[daten[,1]!=daten[,2],] -- two values

[R] Ordering zoo-object by its index

2009-07-09 Thread Sergey Goriatchev
Hello everyone, Say I have zoo object x.Date - as.Date(2003-02-01) + c(1, 3, 7, 9, 14) - 1 x - zoo(rnorm(5), x.Date) y - zoo(rt(5, df=2), x.Date) z - zoo(rt(5, df=5), x.Date) Data - merge(x,y,z) What should I do to make the latest values appear at the top? Thank you for your help! Regards,

Re: [R] r bug (?) display of data

2009-07-09 Thread Peter Dalgaard
Marc Jekel wrote: Hi R Fans, I stumbled across a strange (I think) bug in R 2.9.1. I have read in a data file with 5934 rows and 9 columns with the commands: daten = data.frame(read.table(C:/fussball.dat,header=TRUE)) Then I needed a subset of the data file: newd =

Re: [R] r bug (?) display of data

2009-07-09 Thread Uwe Ligges
Marc Jekel wrote: Hi R Fans, I stumbled across a strange (I think) bug in R 2.9.1. I have read in a data file with 5934 rows and 9 columns with the commands: daten = data.frame(read.table(C:/fussball.dat,header=TRUE)) Then I needed a subset of the data file: newd =

Re: [R] A Lattice Question

2009-07-09 Thread Uwe Ligges
Which curve? How do you want to specify it? Where is the reproducible example (we do not have all your data to quickly test it)? Best, Uwe Ligges Haoda Fu wrote: To the Lattice expert - I am new to the lattice package and I would like to add a curve to the xyplot(). I know that I need to

Re: [R] Picante package 0.7 on mac

2009-07-09 Thread Uwe Ligges
Alfonso Rojas wrote: Hello, I tried to run the package but it shows me the following error: In addition: Warning message: package 'picante' was built under R version 2.10.0 Error in library(picante) : .First.lib failed for 'picante' Try to reinstall a binary version that fits to your

Re: [R] \dQuote in packages

2009-07-09 Thread Uwe Ligges
Rebecca, the attachments have been stripped off by the mailing list. Rebecca Sela wrote: That's good to know. I have attached three Rd files that gave errors (others gave identical errors). I would love to know what is wrong with them. I'm using 2.1.1 because that is what is installed on

Re: [R] Save rgl plot3d Graph as Image

2009-07-09 Thread Duncan Murdoch
Patrick Gedeon wrote: Dear Users: I wish to save 3d scatter plots I have generated using the plot3d command in the rgl package. Any image format such as .tiff would work. Can anyone tell me how to do this? Try snapshot3d(), or rgl.postscript(). The postscript conversion is somewhat limited,

[R] Bug in package.skeleton, R 2.9.0?

2009-07-09 Thread Daniel Klevebring
Dear all, I am using package.skeleton to build a small packages of misc function for personal use. I have recently discovered that the option force=TRUE doesn't seem to do what is meant to do. Here's what I'm doing: setwd(/Users/danielk/Documents/R/packages/dk) files - paste(codebase,

Re: [R] R-help Digest, Vol 77, Issue 9

2009-07-09 Thread SIES 73
Hi, This may be due to several reasons. That I can think about: 1) Ensure you close *all* possibly open workbooks: nBooks - xl[[Workbooks]]$Count(); for (i in seq_len(nBooks)) xl[[Workbooks]]$item(i)$Close(SaveChanges=FALSE); 2) The excel application reference

Re: [R] Population pyramids

2009-07-09 Thread Jim Lemon
Victor Manuel Garcia Guerrero wrote: Hi, I hope somebody can help me with this issue: I am doing population pyramids using the barplot command, so in the left side I have male age structure and in the right side the female age structure. To plot the male age structure I put the data in

Re: [R] Ordering zoo-object by its index

2009-07-09 Thread Gabor Grothendieck
To display that object in reverse time order try this: as.data.frame(Data)[nrow(Data):1, ] On Thu, Jul 9, 2009 at 5:21 AM, Sergey Goriatchevserg...@gmail.com wrote: Hello everyone, Say I have zoo object x.Date - as.Date(2003-02-01) + c(1, 3, 7, 9, 14) - 1 x - zoo(rnorm(5), x.Date) y -

Re: [R] Ordering zoo-object by its index

2009-07-09 Thread Sergey Goriatchev
Hi, Gabor Thank you! That is exactly what I did, even before your email. :-) Regards, Sergey On Thu, Jul 9, 2009 at 12:52, Gabor Grothendieckggrothendi...@gmail.com wrote: To display that object in reverse time order try this: as.data.frame(Data)[nrow(Data):1, ] On Thu, Jul 9, 2009 at

Re: [R] Best way to export values from a function?

2009-07-09 Thread Godmar Back
On Thu, Jul 9, 2009 at 4:50 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 09.07.2009 02:57:33: On Wed, Jul 8, 2009 at 8:34 PM, Jason Rupertjasonkrup...@yahoo.com wrote: Maybe there is a great website out there or white paper that discusses

Re: [R] Ordering zoo-object by its index

2009-07-09 Thread Gabor Grothendieck
One additional thought. If the reason you want to do that is just so that you can see the last few rows more easily then tail(Data) will display the last few rows or tail(Data, 10) will display the last 10 rows. On Thu, Jul 9, 2009 at 7:36 AM, Sergey Goriatchevserg...@gmail.com wrote: Hi,

Re: [R] Best way to export values from a function?

2009-07-09 Thread Petr PIKAL
Hi Godmar Back god...@gmail.com napsal dne 09.07.2009 14:09:42: On Thu, Jul 9, 2009 at 4:50 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 09.07.2009 02:57:33: snip Not so weird. What do you expect from c(1:5, 10:20, 30:50) You mean what

[R] RExcel/ RCom

2009-07-09 Thread Brecknock, Peter
Hi All Apologies if this is not the correct mailing list for this question. I have installed RExcel and RCom from CRAN. R is indicating that I need an additional file/package statconnDCOM from rcom.univie.ac.at I have been trying to access this website over the last 2 days be it appears to

Re: [R] Reading from Google Docs

2009-07-09 Thread Duncan Temple Lang
Thanks for pointing that out. Yes, the link on the package web site was for 0.2-1 and that was the one used to build the binary for Windows. Now updated in both places and the binary repository will give 0.2-2. How to find the version of an installed package? packageDescription(RGoogleDocs)

Re: [R] RDCOMClient: how to close Excel process?

2009-07-09 Thread J. R. M. Hosking
Lauri Nikkinen wrote: Thanks again. That did not work either. I get library(RDCOMClient) xl - COMCreate(Excel.Application) wk - xl$Workbooks() sh - wk$Open(normalizePath(sample_file.xls))$Sheets()$Count() wk$Close() [1] TRUE xl$Quit() NULL and there is still Excel process open in the

[R] T.test error help

2009-07-09 Thread Amit Patel
Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE, var.equal = FALSE, : data are essentially constant The script i am using is for (i in 1:length(zz[,1])) { Samp1 - zz[i,2:17] Samp2 -

[R] Apply weights to the Efron Approximation

2009-07-09 Thread Bessy
Dear all, I want to apply weights to my sample data set and I am struggling with the Efron Approximation with weights. I have got one sample data shown as below: customerweekarrest fin age raceweight 1weight 2weight 3 1 20 1 1 27

Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Steve Lianoglou
Hi Nathan, On Jul 8, 2009, at 10:20 PM, Nathan S. Watson-Haigh wrote: I have two matrices: m1 - matrix(1,4,4) m1 [,1] [,2] [,3] [,4] [1,]1111 [2,]1111 [3,]1111 [4,]1111 m2 - matrix(0,3,3) diag(m2) - 1 m2 [,1] [,2]

Re: [R] T.test error help

2009-07-09 Thread Steve Lianoglou
Hi, On Jul 9, 2009, at 9:19 AM, Amit Patel wrote: Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE, var.equal = FALSE, : data are essentially constant The script i am using is for (i

Re: [R] Ordering zoo-object by its index

2009-07-09 Thread Sergey Goriatchev
Hi, Gabor Yes, I am familiar with tail() function. I use it extensively on a day to day basis. In this particular case I needed to order a zoo object by date, after I have created it with RBloomberg. Thank you for your time! Regards, Sergey On Thu, Jul 9, 2009 at 14:36, Gabor

Re: [R] clogit comparison between Stata and R

2009-07-09 Thread Thomas Lumley
On Wed, 8 Jul 2009, David Hugh-Jones wrote: Hello all I'm moving back and forth between stata and R at the moment - of course, using R whenever possible :-) I'm running conditional logits on some panel data and I get slightly different results and different N in the two programs. That's

Re: [R] heatmap.2: question regarding the raw z-score

2009-07-09 Thread James W. MacDonald
Hi Chrysanthi, Chrysanthi A. wrote: Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores

Re: [R] Dantzig Selector

2009-07-09 Thread roger koenker
There is an experimental version available here: http://www.econ.uiuc.edu/~roger/research/sparse/sfn.html that uses the interior point code in the package quantreg. There is an option to exploit possible sparsity of the X matrix. Comments would be welcome. url:

Re: [R] RDCOMClient: how to close Excel process?

2009-07-09 Thread Lauri Nikkinen
This solution worked: nBooks - xl[[Workbooks]]$Count(); for (i in seq_len(nBooks)) xl[[Workbooks]]$item(i)$Close(SaveChanges=FALSE); from http://www.mail-archive.com/r-help@r-project.org/msg61498.html Thanks! -L 2009/7/9 Lauri Nikkinen lauri.nikki...@iki.fi: Thanks

[R] naming of columns in R dataframe consisting of mixed data (alphanumeric and numeric)

2009-07-09 Thread Mary A. Marion
Hello, I have an r function that creates the following dataframe tresults2. Notice that column 1 does not have a column heading. Tresults2: [,1] estparam 18.0 nullval 20.0 . . . ciWidth 2.04622 HalfInterval 1.02311 pertinent code: results-cbind(

[R] treating a data symbol like a character

2009-07-09 Thread Andrew Yee
Hi, is there a way to treat a data symbol, e.g. one with pch = 16, as a character? Specifically, I'm interested in creating a line of text as follows using the text() function O alpha O beta O gamma where the O is pch 16 and filled with a specific color. Not sure if this is possible or not.

Re: [R] treating a data symbol like a character

2009-07-09 Thread Jorge Ivan Velez
Hi Andrew, Do you want to put the symbols you described as a legend in a plot? If so, here is one way: x - rnorm(3) plot(x, pch = 16, cex = 1.1, col = 1:3) legend('topleft', ncol = 3, c(expression(alpha), expression(beta), expression(gamma)), pch = 16, cex = 1.1, col = 1:3) Is you do

[R] plm Issues

2009-07-09 Thread Damien Moore
Hi List I'm having difficulty understanding how plm should work with dynamic formulas. See the commands and output below on a standard data set. Notice that the first summary(plm(...)) call returns the same result as the second (it shouldn't if it actually uses the lagged variable requested). The

Re: [R] treating a data symbol like a character

2009-07-09 Thread Andrew Yee
Thanks for your help. I should have been more clear in my initial e-mail. I shouldn't have used 'alpha' or 'beta,' to avoid confusion with them as Greek symbols. I should have stated something like: O foo O abcd O John While I'm familiar with using legend to make the filled boxes, I'm

Re: [R] treating a data symbol like a character

2009-07-09 Thread Jorge Ivan Velez
Hi Andrew, If I understand correctly, then # Data x - c(3,4,2) # Collection of text and symbols Text - c('foo', 'abcd', 'John') PCH - c('+','O','$') # Plotting plot(x, pch = PCH) legend('topright', pch = PCH, Text, ncol = 3) should be close to what you want. Note that the text() / points()

Re: [R] treating a data symbol like a character

2009-07-09 Thread Andrew Yee
Great, that's a good starting point. Andrew On Thu, Jul 9, 2009 at 11:20 AM, Jorge Ivan Velez jorgeivanve...@gmail.comwrote: Hi Andrew, If I understand correctly, then # Data x - c(3,4,2) # Collection of text and symbols Text - c('foo', 'abcd', 'John') PCH - c('+','O','$') # Plotting

[R] How to: initialize, setValidity, copy-constructor

2009-07-09 Thread Renaud Gaujoux
Hello list, I'm having troubles setting up a basic calss hierarchy with S4. Here is a simplified schema of what I'd like to do: - Two classes: A and B that extends A - Ensure that the slots added by B are consistent with the slots of A - Let A initialize itself (I'm not supposed to know the

[R] correct way to subset a vector

2009-07-09 Thread Juliet Hannah
Hi, #make example data dat - data.frame(matrix(rnorm(15),ncol=5)) colnames(dat) - c(ab,cd,ef,gh,ij) If I want to get a subset of the data for the middle 3 columns, and I know the names of the start column and the end column, I can do this: mysub - subset(dat,select=c(cd:gh)) If I wanted to do

Re: [R] Population pyramids

2009-07-09 Thread Daniel Malter
Victor, use the axes=FALSE option, as you do. Then use the labels and at options in the axis argument to place the tickmark labels in the negative plot manually par(mfrow=c(1,2),bty=n,mai=c(0.5, 0.25, 0.25, 0.25)) x=rgamma(1000,10,0.3) barplot(height=t(-x), width = 0.825, space = NULL,

Re: [R] T.test error help

2009-07-09 Thread Daniel Malter
put another condition in your loop if(all.equal(x,y)=TRUE) i=i+1 else t.test... something in that direction. best, daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org

Re: [R] correct way to subset a vector

2009-07-09 Thread Steve Lianoglou
Hi, On Jul 9, 2009, at 11:40 AM, Juliet Hannah wrote: Hi, #make example data dat - data.frame(matrix(rnorm(15),ncol=5)) colnames(dat) - c(ab,cd,ef,gh,ij) If I want to get a subset of the data for the middle 3 columns, and I know the names of the start column and the end column, I can do

Re: [R] wordStem problems in R 2.9, Fedora 11; Linux Kernel 2.6.29.5-191.fc11.i586

2009-07-09 Thread Reitsma, Rene - COB
Duncan, Thanks for helping. I reinstalled Rstem from source (using the omegahat URL) and this time things are working. :-) RR -Original Message- From: Duncan Temple Lang [mailto:dun...@wald.ucdavis.edu] Sent: Tuesday, July 07, 2009 5:33 PM To: Reitsma, Rene - COB Cc:

Re: [R] T.test error help

2009-07-09 Thread Uwe Ligges
Daniel Malter wrote: put another condition in your loop if(all.equal(x,y)=TRUE) i=i+1 else t.test... something in that direction. Sorry, but that's neither valid R code nor sensible in this case. See my suggestions below. best, daniel - cuncta stricte

[R] math symbols in R

2009-07-09 Thread Mary A. Marion
Hello, I would like R software to printout a sentence including a statement such as Ho: mu=5 vs Ha: mu ne 5 where ne stands for the math symbol notequal and mu is greek letter for u. How to do? Most of the help questions I have seen have been those involving graphs. Thank you. Sincerely,

[R] Logistic Regression: Likelihoo-Ratio Based Confidence Intervals

2009-07-09 Thread alex the lipenator
Hello! I hope this email finds you all well.  I have a rather elementary question.  I am interested in obtaining likelihood ratio-based confidence intervals of logistic regression parameter estimates (i.e., the MLE).  How do I specify likelihood ratio CIs in the confint() function, or do I

Re: [R] correct way to subset a vector

2009-07-09 Thread Marc Schwartz
On Jul 9, 2009, at 10:40 AM, Juliet Hannah wrote: Hi, #make example data dat - data.frame(matrix(rnorm(15),ncol=5)) colnames(dat) - c(ab,cd,ef,gh,ij) If I want to get a subset of the data for the middle 3 columns, and I know the names of the start column and the end column, I can do this:

Re: [R] math symbols in R

2009-07-09 Thread Bert Gunter
?plotmath Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mary A. Marion Sent: Thursday, July 09, 2009 12:04 PM To: r-help@r-project.org Subject: [R] math symbols in R Hello, I

[R] Creating and Using Objects in R

2009-07-09 Thread Lorenzo Isella
Dear All, I am not very into object-oriented programming, but I would like to learn the ropes for some R applications. Quoting from the online R language definition (paragraph 5.1) Consider the following simple example. A point in two-dimensional Euclidean space can be specified by its

[R] assigning vector name by increasing index in loop

2009-07-09 Thread cbc123
Hello I have a large data table that I wish to divide in to vectors, as in v1 v2 v3 v4 v5 id11 2 34 5 id26 7 8 9 10 newv1 - c(table[1,1], table[3,1], table [5,1]) newv2-c(table[1,2], table[3,2]. table[5,2]) ...and

Re: [R] Extracting a column name in loop?

2009-07-09 Thread mister_bluesman
Thank you both for that. Much appreciated. mister_bluesman wrote: Hi, I am writing a script that will address columns using syntax like: data_set[,1] to extract the data from the first column of my data set, for example. This code will be placed in a loop (where the column

[R] Executing an error prone function without stopping a script

2009-07-09 Thread Tolga I Uzuner
Dear R Users, I've used this a long time ago but have forgotten. Trawling aroung the various sources somehow does not lead me to it. How can I execute an error prone function without stopping a script if it goes wrong ? Thanks in advance, Tolga This email is confidential and subject to

Re: [R] How to: initialize, setValidity, copy-constructor

2009-07-09 Thread Martin Morgan
Hi Renaud -- Renaud Gaujoux ren...@mancala.cbio.uct.ac.za writes: Hello list, I'm having troubles setting up a basic calss hierarchy with S4. Here is a simplified schema of what I'd like to do: - Two classes: A and B that extends A - Ensure that the slots added by B are consistent with

Re: [R] R-help Digest, Vol 77, Issue 9

2009-07-09 Thread Lauri Nikkinen
Thanks, this worked!!! nBooks - xl[[Workbooks]]$Count(); for (i in seq_len(nBooks)) xl[[Workbooks]]$item(i)$Close(SaveChanges=FALSE); -L 2009/7/9 Bengoechea Bartolomé Enrique (SIES 73) enrique.bengoec...@credit-suisse.com: Hi, This may be due to several reasons. That I can think

[R] more than one mathematical annotation into a legend

2009-07-09 Thread Thomas Roth (geb. Kaliwe)
Dear members, Is there a way to put more than one mathematical annotation into a legend together with a calculated value? x = 2 plot(1:10) #Works legend(8, 8, substitute(t[m] == x)) #does not work legend(4,4, c(substitute(t[m] == x), substitute(t[n] == x))) Thanks Thomas Roth

[R] executing an error prone function without stopping a script

2009-07-09 Thread Tolga I Uzuner
Dear R Users, I've used this a long time ago but have forgotten. Trawling aroung the various sources somehow does not lead me to it. How can I execute an error prone function without stopping a script if it goes wrong ? Thanks in advance, Tolga This email is confidential and subject to

Re: [R] Creating and Using Objects in R

2009-07-09 Thread Gabor Grothendieck
Here it is done without S3. Note that UseMethod is basically just an alternative to an if statement. Perhaps this makes it more understandable. x1 - list(x = 1, y = 2) class(x1) - xypoint x2 - list(r = 1, theta = pi/2) class(x2) - rthetapoint XPOS - function(x) { if (inherits(x,

Re: [R] Tex fonts in R plots

2009-07-09 Thread cls59
KARAVASILIS GEORGE wrote: Hello, R users. I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4 in R plots, e.g. in xlab, ylab or legend. How can I do that? Thank you in advance. A colleague and I have developed a package called pgfSweave that turns R plots created

Re: [R] executing an error prone function without stopping a script

2009-07-09 Thread cls59
TU wrote: Dear R Users, I've used this a long time ago but have forgotten. Trawling aroung the various sources somehow does not lead me to it. How can I execute an error prone function without stopping a script if it goes wrong ? Thanks in advance, Tolga See ?try Basically,

[R] X-axis labels not displayed when changing ylim

2009-07-09 Thread Sarah Bonnin
Dear R users, I am encountering a x axis labeling problem on quite basic plots... I use the following code which displays the labels on the x-axis with a 45 degrees angle: p - plot(myobject1, type=b, col=red,cex=1, lwd=2, axes=FALSE, ann=FALSE, ylim=c(0,70)) title(main=title, font.main=4)

Re: [R] more than one mathematical annotation into a legend

2009-07-09 Thread Zhiliang Ma
On Thu, Jul 9, 2009 at 9:39 AM, Thomas Roth (geb. Kaliwe)hamstersqu...@web.de wrote: try this: legend(4,4, expression(t[m] == x, t[n] == x)) cheers, Zhiliang Dear members, Is there a way to put more than one mathematical annotation into a legend together with a calculated value? x = 2

[R] Compiling R-2.9.1 on Mac OS X 10.4

2009-07-09 Thread Sinha, Raktim, DFCI
Hello, I am trying to compile R-2.9.1 on Mac OS-X 10.4 using --enable-R-shlib. I am not comfortable with Mac/Linux environments and trying to follow the instructions from CRAN site to every detail. The Mac OS did not have a gcc (gcc -version did not work). So I did the following: ##

[R] Issues with file.info?

2009-07-09 Thread Jason Rupert
Are there any tricks associated with file.info? I just tried it on a directory folder and it returned NA for all fields for all files. I tried it on a different folder with different files and it still returned NA. I tried it on a specific file and it returned all the proper info

Re: [R] Compiling R-2.9.1 on Mac OS X 10.4

2009-07-09 Thread Marc Schwartz
On Jul 9, 2009, at 12:12 PM, Sinha, Raktim, DFCI wrote: Hello, I am trying to compile R-2.9.1 on Mac OS-X 10.4 using --enable-R- shlib. I am not comfortable with Mac/Linux environments and trying to follow the instructions from CRAN site to every detail. The Mac OS did not have a

[R] 'scan' in a script?

2009-07-09 Thread Mark Knecht
When I use the scan function in the Rgui console it works as expected. However it seems that when I put the same command in a script file it doesn't wait for input. Is there an option to scan to make it wait for input when used in a script? Or is there possibly a different function that will do

Re: [R] Substituting numerical values using `apply'

2009-07-09 Thread Santiago Olivella
Thank you all for your help. SO. Henrique Dallazuanna wrote: Try this: sapply(names(DF), function(n)ifelse(DF[,n] %in% c(1, 2), n, NA)) Where DF is your data.frame On Wed, Jul 8, 2009 at 5:25 PM, Olivella olive...@wustl.edu mailto:olive...@wustl.edu wrote: Hello, I wish to

[R] Lattice xyplot: same scales within one factor

2009-07-09 Thread Orion Buske
I am using R 2.8.1 and lattice to produce xyplots conditioned on two factors. What I would like is to have the scales be free between values of one factor, but some within. Thus, in the example: xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars, scales=list(x=list(relation=free)))

Re: [R] Compiling R-2.9.1 on Mac OS X 10.4

2009-07-09 Thread Don MacQueen
I used to build from source on Mac OS X, but I stopped when I found I could do everything I needed to do from the binary on CRAN. That includes building my own packages that use fortran, or building the one or two CRAN packages that use C code and do not have Mac binaries on CRAN. In

Re: [R] Reading from Google Docs

2009-07-09 Thread Johannes Huesing
Gabor Grothendieck ggrothendi...@gmail.com [Wed, Jul 08, 2009 at 10:31:30PM CEST]: [...]    [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] naming of columns in R dataframe consisting of mixed data (alphanumeric and numeric)

2009-07-09 Thread Etienne B. Racine
Mary A. Marion-2 wrote: Hello, I have an r function that creates the following dataframe tresults2. Notice that column 1 does not have a column heading. Tresults2: [,1] estparam 18.0 nullval 20.0 . . . ciWidth 2.04622 HalfInterval 1.02311

Re: [R] 'scan' in a script?

2009-07-09 Thread jim holtman
Exactly how are you using it? How you executing your script? Are you using cut/paste or source? Have you tried 'readline'? More details on what you mean by it does not work as expected. On Thu, Jul 9, 2009 at 2:24 PM, Mark Knechtmarkkne...@gmail.com wrote: When I use the scan function in the

Re: [R] Issues with file.info?

2009-07-09 Thread jim holtman
Works fine for me on 2.9.1: file.info('/jph') size isdir mode mtime ctime atime exe /jph0 TRUE 777 2009-06-29 15:15:13 2008-02-14 09:31:26 2009-07-09 15:57:04 no On Thu, Jul 9, 2009 at 2:02 PM, Jason Rupertjasonkrup...@yahoo.com wrote: Are there

Re: [R] How to Populate List

2009-07-09 Thread Rolf Turner
On 10/07/2009, at 2:55 AM, Gaurav Kumar wrote: Hi, I'm new to R and would like to know, how one can populate the list with array data. I'm reading a tab separated table in R. The data in the table looks something like this. #Table Data CompABC Extracellular103268

Re: [R] Issues with file.info?

2009-07-09 Thread Jason Rupert
Issue was with an entire directory/folder or list of files in a directory. It seemed to work fine for a single file or being sent a single file/folder. I will try to generate some example code to demonstrate the problem. Thanks again for all the replies. --- On Thu, 7/9/09, jim holtman

Re: [R] Issues with file.info?

2009-07-09 Thread Rolf Turner
On 10/07/2009, at 6:02 AM, Jason Rupert wrote: Are there any tricks associated with file.info? I just tried it on a directory folder and it returned NA for all fields for all files. I tried it on a different folder with different files and it still returned NA. I tried it on a

[R] Lattice xyplot: same scales within one factor

2009-07-09 Thread OB
I am using R 2.8.1 and lattice to produce xyplots conditioned on two factors. What I would like is to have the scales be free between values of one factor, but some within. Thus, in this example, xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars,     scales=list(x=list(relation=free)))

Re: [R] X-axis labels not displayed when changing ylim

2009-07-09 Thread Patrick Connolly
On Thu, 09-Jul-2009 at 05:36PM +0200, Sarah Bonnin wrote: Dear R users, I am encountering a x axis labeling problem on quite basic plots... I use the following code which displays the labels on the x-axis with a 45 degrees angle: p - plot(myobject1, type=b, col=red,cex=1, lwd=2,

Re: [R] 'scan' in a script?

2009-07-09 Thread Mark Knecht
Jim, In Rgui there is a feature to create a new script so I open that and get a blank editor. I put these commands in the script MyNames = scan(what=) MyNames Whether I ask Rgui to run the whole script as a script - not sourced - it runs the first command, doesn't wait for input and then

[R] Strange t-test error: grouping factor must have exactly 2 levels while it does...

2009-07-09 Thread Tymek W
Hi, Could anyone tell me what is wrong: length(unique(mydata$myvariable)) [1] 2 and in t-test: (...) Error in t.test.formula(othervariable ~ myvariable, mydata) : grouping factor must have exactly 2 levels I re-checked the code and still don't get what is wrong. Moreover, there is some

[R] How to combine two rows (in a dataframe) into a third row?

2009-07-09 Thread Mark Na
Dear R-helpers, I have two rows in my dataframe: IDVALUE 1A10 1B15 and I would like to combine these two rows into a single (new) row in my dataframe: IDVALUE 125 ...simply by specifying a new value for ID and summing the two VALUES. I have been trying to do this with

[R] SSOAP failure

2009-07-09 Thread nermin sarlak
Hi, I’m using R package SSOAP to retrieve data from web services. I’m using the code below to # R code ### library(SSOAP) then I call the nwis.R which exists in SSOAP example folder. However system gives me following errors: Error in parse

[R] datadist() in Design library

2009-07-09 Thread array chip
Hi I got an error message using datadist() from Design package: library(Design,T) dd - datadist(beta.final) options(datadist=dd) lrm(Disease ~ gsct+apcct+rarct, x=TRUE, y=TRUE) Error in eval(expr, envir, enclos) : object Disease not found All variables inclduing response variable

Re: [R] Executing an error prone function without stopping a script

2009-07-09 Thread Duncan Murdoch
Tolga I Uzuner wrote: Dear R Users, I've used this a long time ago but have forgotten. Trawling aroung the various sources somehow does not lead me to it. How can I execute an error prone function without stopping a script if it goes wrong ? See ?try. Duncan Murdoch Thanks in advance,

[R] Stratified data summaries

2009-07-09 Thread Hayes, Rachel M
Hi All, I'm trying to automate a data summary using summary or describe from the HMisc package. I want to stratify my data set by patient_type. I was hoping to do something like: Describe(myDataFrame ~ patient_type) I can create data subsets and run the describe function one at a

Re: [R] datadist() in Design library

2009-07-09 Thread Jorge Ivan Velez
Dear John, Have you tried it specifying the 'data' argument as suggested in lrm help? Try this: lrm(Disease ~ gsct + apcct + rarct, data = beta.final, x = TRUE, y = TRUE ) HTH, Jorge On Thu, Jul 9, 2009 at 6:46 PM, array chip arrayprof...@yahoo.com wrote: Hi I got an error message

Re: [R] How to combine two rows (in a dataframe) into a third row?

2009-07-09 Thread Peter Alspach
Tena koe Mark ?tapply with the index argument some suitable substring of your ID column. HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mark Na Sent: Friday, 10 July 2009 10:28 a.m. To:

[R] validate() in Design library

2009-07-09 Thread array chip
Hi, another question about validate() in Design library. The arugment B of this function is number of repetition for method=bootstrap, which is easy to understand; but for method=crossvalidation, B is the number of groups of omitted observations. This is confusing, I don't understand what it

Re: [R] datadist() in Design library

2009-07-09 Thread array chip
Dear Jorge, Yes, with data=beta.final in the lrm(), it worked. But I thought one of the reasons for datadist() is to make it unnecessary to specify the data frame in the lrm(). Maybe I am completely wrong here. Thanks John --- On Thu, 7/9/09, Jorge Ivan Velez jorgeivanve...@gmail.com wrote:

Re: [R] 'scan' in a script?

2009-07-09 Thread Gabor Grothendieck
Check out: http://tolstoy.newcastle.edu.au/R/help/03a/6855.html On Thu, Jul 9, 2009 at 2:24 PM, Mark Knechtmarkkne...@gmail.com wrote: When I use the scan function in the Rgui console it works as expected. However it seems that when I put the same command in a script file it doesn't wait for

Re: [R] Compiling R-2.9.1 on Mac OS X 10.4

2009-07-09 Thread Sinha, Raktim, DFCI
Matt Don -- Thanks a lot for the comments. I think I need to figure out why JRI is not recognizing the R installation as shared library build first, and go from there. I will try post back on r-sig-mac if I need too. Best, Raktim -Original Message- From: Marc Schwartz

Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Steven, This looks great. Thanks! Nathan Steve Lianoglou wrote: Hi Nathan, On Jul 8, 2009, at 10:20 PM, Nathan S. Watson-Haigh wrote: I have two matrices: m1 - matrix(1,4,4) m1 [,1] [,2] [,3] [,4] [1,]1111 [2,]

[R] Comparing Probit and Logit Coefficients Across Groups

2009-07-09 Thread OSTERFELD Marius
Hi, I want to compare probit coefficients across groups with the method proposed by Allison (1999). The method corrects for unobserved heterogeneity in binary regression models. I can find only a SAS macro on the author's homepage (http://www.ssc.upenn.edu/~allison/glogit.sas). Has anyone of

  1   2   >