Re: [R] R Crashes when using "large" matrices (Ubuntu 11.04)

2011-06-03 Thread Prof Brian Ripley
On Fri, 3 Jun 2011, Matias Salibian-Barrera wrote: Hello, This simple SVD calculation (commands are copied immediately below) crashes on my Ubuntu machine (R 2.13.0). However it works fine on my Windows 7 machine, so I suspect there's a problem with (my?) Ubuntu and / or R. Can anybody else

Re: [R] Value of 'pi'

2011-06-03 Thread John
Last line, try "but one can't, for Pi is transcendental." On Friday, June 03, 2011 04:12:07 AM Jim Lemon wrote: > On 06/01/2011 10:14 AM, baptiste auguie wrote: > > I propose a Pi Haiku (PIQ), > > > > Pi is of certain value, > > In statistics, invaluable, yet > > Transcending numerics. > > Ho

Re: [R] Superscripts in strip labels of lattice plot

2011-06-03 Thread Peter Ehlers
On 2011-06-03 15:10, David Winsemius wrote: On Jun 3, 2011, at 5:38 PM, Judith Flores wrote: Hello, I need to add superscripts of the strip labels of a xyplot. For example: xyplot(a~b|c) Where c has 3 factor levels: A^2, A^3 and A^4. How can I introduce expressions in the strip labe

[R] Does anyone running the latest version of R on IBM AIX 5.3?

2011-06-03 Thread Xiaobo Gu
Because the major processing of R is single threaded, I think computers such as IBM P servers with higher CPU Clock Speed will achieve better performance. Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] R Crashes when using "large" matrices (Ubuntu 11.04)

2011-06-03 Thread Matias Salibian-Barrera
Sorry for re-posting, but the original one ended up inside a previous and unrelated thread. -- Matias - Hello, This simple SVD calculation (commands are copied immediately below) crashes on my Ubuntu machine (R 2.13.0). However it works fine on my Windows 7 machine, so I suspect there's a

Re: [R] conversion of matrix into list

2011-06-03 Thread Norm Matloff
Martin Spindler wrote: > I have a matrix X which consists of 2 columns. I would like to convert this > matrix into a list where every entry of the list consists of a single row of > the matrix. Here's another way besides split(): # returns a list of the matrix m's rows (rowcol=1) or columns mat2

Re: [R] Arules: R Crashes when running eclat with tidLists=TRUE

2011-06-03 Thread Tom D. Harray
Update I had the chance to test the issue tonight using R version 2.12.2 on a Linux (Ubuntu 10.04.2, x86_64, kernel 2.6.32-32-generic) system: It does also crash (with a support of 0.01 instead of 0.05 posted earlier) running eclat(Adult, parameter=list(support=0.01, tidLists=TRUE)) but

Re: [R] Problem with package development

2011-06-03 Thread Rolf Turner
On 04/06/11 00:02, Barry Rowlingson wrote: . someone on StackOverflow was wondering why "0<= x<= 1" isn't a valid expression, neither in the context of what he expected (TRUE if x is between 0 and 1) nor how I explained it would function (as (0<=x)<= 1, and then comparing a TRUE/FALSE again

Re: [R] Notes on R Objects

2011-06-03 Thread Rolf Turner
On 04/06/11 04:18, Matthew DeAngelis wrote: Hi all, Is there any way to add notes or comments to R objects? It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the obj

[R] R Crashes when using "large" matrices (Ubuntu 11.04)

2011-06-03 Thread Matias Salibian-Barrera
Hello, This simple SVD calculation (commands are copied immediately below) crashes on my Ubuntu machine (R 2.13.0). However it works fine on my Windows 7 machine, so I suspect there's a problem with (my?) Ubuntu and / or R. Can anybody else reproduce it (with Ubuntu 11.04)? Thanks in advance.

[R] Arules: R Crashes when running eclat with tidLists=TRUE

2011-06-03 Thread Tom D. Harray
Hello, I'm using the eclat function of the arules package (1.0-6) for the identification of frequent itemsets. I need the tidLists, but if I set in the function tidLists=TRUE R crashes (Windows XP Professional SP3, 32 bit, R version 2.12.1 (2010-12-16), reproducible on two different computers) wit

Re: [R] generating random covariance matrices (with a uniform distribution of correlations)

2011-06-03 Thread Petr Savicky
On Fri, Jun 03, 2011 at 01:54:33PM -0700, Ned Dochtermann wrote: > Petr, > This is the code I used for your suggestion: > > k<-6;kk<-(k*(k-1))/2 > x<-matrix(0,5000,kk) > for(i in 1:5000){ > A.1<-matrix(0,k,k) > rs<-runif(kk,min=-1,max=1) > A.1[lower.tri(A.1)]<-r

Re: [R] debug R code

2011-06-03 Thread Duncan Murdoch
On 11-06-03 4:49 PM, Hui Du wrote: Hi List, I have a question regarding debug R code. I know I can use debug(fuction_name) and when code runs to that point, it will go to debugger. My question is inside debugger, how to stop a code at a specified line. For example, in C (gdb or

Re: [R] Superscripts in strip labels of lattice plot

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 5:38 PM, Judith Flores wrote: Hello, I need to add superscripts of the strip labels of a xyplot. For example: xyplot(a~b|c) Where c has 3 factor levels: A^2, A^3 and A^4. How can I introduce expressions in the strip labels? Here is an example that comes up on a sea

[R] Superscripts in strip labels of lattice plot

2011-06-03 Thread Judith Flores
Hello, I need to add superscripts of the strip labels of a xyplot. For example: xyplot(a~b|c) Where c has 3 factor levels: A^2, A^3 and A^4. How can I introduce expressions in the strip labels? Thank you very much! Judith __ R-help@r-proj

Re: [R] modify a data frame by values in the columns

2011-06-03 Thread Muhammad Rahiz
Hi Jason, This is one way; c1 <- seq(2,20,2) c2 <- seq(1,19,2) c3 <- cbind(c1,c2) c3[,1][which(c3[,1]<12)] <- -1 c3[,2][which(c3[,2]>10)] <- -1 Muhammad On Fri, 3 Jun 2011, Jason024 wrote: I have a data frame like this: col1 col2 r1 21 r2 43 r3 65 r4 87 r

Re: [R] Checking and building package

2011-06-03 Thread Petar Milin
Hello Uwe, No, "foo" is the name of C-file -- "foo.c". Package has different name. I tried R CMD INSTALL myPackage. And, yes there is a myPackage.so in src/ folder, but not "foo.so". I got an error message that says: ** help *** installing help indices ** building package indices ... ** testing

[R] How to reconcile Kalman filter result (by package dlm) with linear regression?

2011-06-03 Thread Taste of R
  Hello All,   I am working with dlm for the purpose of estimating and forecasting with a Kalman filter model. I have succesfully set up the model and started generating results. Of course, I need to somehow be sure that the results make sense. Without any apparent target to compare with, my nat

Re: [R] generating random covariance matrices (with a uniform distribution of correlations)

2011-06-03 Thread Ned Dochtermann
Petr, This is the code I used for your suggestion: k<-6;kk<-(k*(k-1))/2 x<-matrix(0,5000,kk) for(i in 1:5000){ A.1<-matrix(0,k,k) rs<-runif(kk,min=-1,max=1) A.1[lower.tri(A.1)]<-rs A.1[upper.tri(A.1)]<-t(A.1)[upper.tri(A.1)] cors.i<-d

[R] debug R code

2011-06-03 Thread Hui Du
Hi List, I have a question regarding debug R code. I know I can use debug(fuction_name) and when code runs to that point, it will go to debugger. My question is inside debugger, how to stop a code at a specified line. For example, in C (gdb or dbx debugger) I can run "stop at 123

Re: [R] Counting occurrences in a moving window

2011-06-03 Thread mdvaan
Thank you very much! I really liked the first solution, it worked great for my larger dataset. M Gabor Grothendieck wrote: > > On Fri, Jun 3, 2011 at 8:11 AM, mdvaan > wrote: >> Would it be possible to use the sqldf package and the ave function to >> simply >> run ave

[R] modify a data frame by values in the columns

2011-06-03 Thread Jason024
I have a data frame like this: col1 col2 r1 21 r2 43 r3 65 r4 87 r5109 r612 11 r714 13 r816 15 r918 17 r10 20 19 I want to modify this data frame, for example, assign every row in column col1 and col2 to -1 if the values in c

Re: [R] Checking and building package

2011-06-03 Thread Uwe Ligges
On 03.06.2011 21:46, Petar Milin wrote: Hello! I am truing to compile an R-package having c-code. I put foo.c in src/ folder and useDynLib("foo") Where "foo" is the name of your package, I hope. Does R CMD INSTALL yourpackage generate a packagename.so (or .dll)? If so, it is just the useSyn

Re: [R] matching by gender and age

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 1:37 PM, 1Rnwb wrote: Thanks, for pointing out the package e1071, the example for matchControls is exactly what I am looking for, however how can I add additional factors to match for. library(e1071) Age.case <- 40 + 5 * rnorm(50) Age.cont <- 45 + 10 * rnorm(150) Age <- c

Re: [R] tkrplot Newbie

2011-06-03 Thread Gabor Grothendieck
On Fri, Jun 3, 2011 at 11:42 AM, Costas Vorlow wrote: > Hello, > > I am trying to write a tcltk based program that plots/manipulates > xts/xoo time series objects. > See the last example at the bottom of the help page ?plot.zoo You might also be interested in the playwith example in the examples

[R] Checking and building package

2011-06-03 Thread Petar Milin
Hello! I am truing to compile an R-package having c-code. I put foo.c in src/ folder and useDynLib("foo") in NAMESPACE file. When trying R CMD check, I got an error message that shared object 'foo' is not found. Then I did R CMD SHLIB foo.c first. However, after that, I got warnings from R CMD

Re: [R] Notes on R Objects

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 12:18 PM, Matthew DeAngelis wrote: Hi all, Is there any way to add notes or comments to R objects? I just suggested attributes(), but then I remembered that there is a specific function named unsurprisingly: ?comment # a non-printed attribute Maybe you need to also

Re: [R] Notes on R Objects

2011-06-03 Thread Gabor Grothendieck
On Fri, Jun 3, 2011 at 12:18 PM, Matthew DeAngelis wrote: > Hi all, > > Is there any way to add notes or comments to R objects?  It can be hard for > me to come up with a descriptive name that encapsulates all the differences > between data sets, so it would be very helpful if I could add a note w

Re: [R] tkrplot Newbie

2011-06-03 Thread Costas Vorlow
You mean use plot() instead of the wrapper plotFunction? Same (I think): > ## > require(quantmod) > require(tcltk) > library(tkrplot) > Sys.setenv(TZ="GMT") > getSymbols("^GSPC", from = "1960-01-01") [1] "GSPC" > > Myhscale <- 2.5# Horizontal scaling > Myvscale <- 1.25# Vertical scaling

Re: [R] Notes on R Objects

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 12:18 PM, Matthew DeAngelis wrote: Hi all, Is there any way to add notes or comments to R objects? It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which

Re: [R] Y error bars, dates on the X-axis

2011-06-03 Thread Terhukka
It works. Brilliant. Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Y-error-bars-dates-on-the-X-axis-tp3571219p3571580.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http

Re: [R] matching by gender and age

2011-06-03 Thread 1Rnwb
Thanks, for pointing out the package e1071, the example for matchControls is exactly what I am looking for, however how can I add additional factors to match for. library(e1071) Age.case <- 40 + 5 * rnorm(50) Age.cont <- 45 + 10 * rnorm(150) Age <- c(Age.case, Age.cont) Sex.case <- sample(c("M", "

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread Ethan Brown
Even after I discovered match(), it took me a little while to figure out how to use it for this task, so to add on to Peter's comment--to add a column for total for each value of "coll.minus.release", try the following: data$ParasitoidMatch <- data$ParasitoidTotal[match(data$coll.minus.release, da

[R] Notes on R Objects

2011-06-03 Thread Matthew DeAngelis
Hi all, Is there any way to add notes or comments to R objects? It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the object. I didn't find anything like this in the

Re: [R] barplot - change width of bar outline

2011-06-03 Thread CAB
Thanks very much Rolf and Marc - this works great! Claire -- View this message in context: http://r.789695.n4.nabble.com/barplot-change-width-of-bar-outline-tp3569552p3571500.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pro

Re: [R] heatmap question

2011-06-03 Thread Mark Aquino
Brilliant, that's exactly what I needed. Thank you. The axis labels are duplicated on top and the bottom now though, but I'm sure there's a way to suppress them from appearing. On Jun 3, 2011, at 11:24 AM, David Winsemius wrote: > > On Jun 3, 2011, at 9:26 AM, Mark Aquino wrote: > >> Yes I u

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 12:43 PM, peter dalgaard wrote: On Jun 3, 2011, at 16:59 , bjmjarrett wrote: I am attempting to emulate the VLOOKUP function from Excel in R. I want to compare one column (coll.minus.release) with another (release.days) to get the number of parasitoid released at that tim

Re: [R] tkrplot Newbie

2011-06-03 Thread Jonathan Daily
According to documentation, tkrplot's fun parameter accepts a function of no arguments. If you remove the arguments from your function, does that kill the error message? On Fri, Jun 3, 2011 at 11:42 AM, Costas Vorlow wrote: > Hello, > > I am trying to write a tcltk based program that plots/manipu

[R] Fit data to distribution

2011-06-03 Thread Muhammad Rahiz
Hi all, I hope to get some assistance in this. I have two datasets, x and y. I'm trying to fit dataset y to the distribution of dataset x. I have the shape, and rate of the distribution of dataset x, but not it's scale. x <- abs(rnorm(21)) y <- abs(rnorm(21)) plot(density(x)) lines(density

[R] Package dlm generates unstable results?

2011-06-03 Thread Taste of R
  Hi, All,   This is the first time I seriously use this package. However, I am confused that the result is quite unstable. Maybe I wrote something wrong in the code? So could anybody give me some hint? Many thanks.   My test model is really simple. Y_t = X_t * a_t + noise(V),(no Intercept h

Re: [R] Y error bars, dates on the X-axis

2011-06-03 Thread Dennis Murphy
Hi: Here's one way to do it with ggplot2; it contains the basic elements you need, including a 'geom' for error bars. Two data frames are used: one that contains the raw data, another that produces the daily means and standard deviations. A couple of bells and whistles are added (e.g., point jitte

Re: [R] VLOOKUP in R - tried everything.

2011-06-03 Thread peter dalgaard
On Jun 3, 2011, at 16:59 , bjmjarrett wrote: > I am attempting to emulate the VLOOKUP function from Excel in R. > > I want to compare one column (coll.minus.release) with another > (release.days) to get the number of parasitoid released at that time > (TotalParasitoids). > > for example: > >

Re: [R] Formula Interpreter in R

2011-06-03 Thread Gabor Grothendieck
On Fri, Jun 3, 2011 at 11:48 AM, amit jain wrote: > > Hi All, > Before writing a simple formula intereter in R myself, i wanted to find out > if any one has done it before. I could not locate it myself. I am looking for > something like this - take a dataframe and a simple formula string as inpu

Re: [R] Not missing at random

2011-06-03 Thread Dennis Murphy
Hi: Try this: x <- matrix(c(rep(1:5, 9), rep(3, 3), 4), ncol = 7, byrow = TRUE) ## indices of x for which the value is less than 3 candidates <- which(x < 3, arr.ind = TRUE)# generates 18 candidates grabs <- sample(nrow(candidates), 15) # 15/49 ~ 0.3 x2 <- x# copy x x2[candidates

Re: [R] R and DBSCAN

2011-06-03 Thread Christian Hennig
Have you considered the dbscan function in library fpc, or was it another one? dbscan in fpc doesn't have a "distance" parameter but several options, one of which may resolve your memory problem (look up the documentation of the "memory" parameter). Using a distance matrix for hundreds of thou

Re: [R] Counting occurrences in a moving window

2011-06-03 Thread Gabor Grothendieck
On Fri, Jun 3, 2011 at 8:11 AM, mdvaan wrote: > Would it be possible to use the sqldf package and the ave function to simply > run ave over a limited set? So something like: > > DF = data.frame(read.table(textConnection("  A  B > 8025  1995 > 8026  1995 > 8029  1995 > 8026  1996 > 8025  1997 > 802

Re: [R] Formula Interpreter in R

2011-06-03 Thread Sarah Goslee
Can you provide an actual R example? I'm not seeing how what you want differs from something like apply(mydataframe, 2, function(x)sum(x^2 + 3)) Sarah On Fri, Jun 3, 2011 at 11:48 AM, amit jain wrote: > > Hi All, > Before writing a simple formula intereter in R myself, i wanted to find out > i

[R] Formula Interpreter in R

2011-06-03 Thread amit jain
Hi All, Before writing a simple formula intereter in R myself, i wanted to find out if any one has done it before. I could not locate it myself. I am looking for something like this - take a dataframe and a simple formula string as input and gives an output with formula applied on different col

[R] Y error bars, dates on the X-axis

2011-06-03 Thread Terhukka
Dear forum, Does anyone know any functions for plotting vertical error bars, if the x-axis variable is a date? I can produce a pretty plot with dates on the x-axis, if I don't want to include error bars. I can also produce a nice plot with error bars, if I just use Julian days for the x-axis, bu

[R] function to reduce resolution of a vector or matrix?

2011-06-03 Thread Carl Witthoft
Hi, I feel dumb even asking, but isn't there an R function somewhere that I can use to reduce the resolution of a vector (or matrix) by summing terms in uniform blocks? That is, for a vector X, reduce it to some X.short as X.short[1]<- sum(X[1:10]); X.short[2] <- sum(X[11:20]), and so on.

[R] tkrplot Newbie

2011-06-03 Thread Costas Vorlow
Hello, I am trying to write a tcltk based program that plots/manipulates xts/xoo time series objects. I have the code I used from ## http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/tkrplot.html : ## require(quantmod) require(tcltk) library(tkrplot) Sys.setenv(TZ="GMT") getSymbols("^GSPC",

[R] Odp: Problem using read.xls - Everything converted to factors

2011-06-03 Thread Petr PIKAL
Hi > > [R] Problem using read.xls - Everything converted to factors > > Hallo, > > I would like to use to read.xls function from the gdata package to read > data from Microsoft Excel files but I experienced a problem: For example > I used the following code: > > testfile<-read.xls("/home/..

Re: [R] Counting occurrences in a moving window

2011-06-03 Thread Gabor Grothendieck
On Thu, Jun 2, 2011 at 11:41 AM, mdvaan wrote: > Hi list, based on the following data.frame I would like to create a variable > that indicates the number of occurrences of A in the 3 years prior to the > current year: > > DF = data.frame(read.table(textConnection("  A  B > 8025  1995 > 8026  1995

Re: [R] heatmap question

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 9:26 AM, Mark Aquino wrote: Yes I understand what ? means, I meant is it possible to use this function (as an argument) with heatmap.2, but I learned I can use add.expr=mtext() to do that. However I'm not simply trying to add more text to the graph but rather move

Re: [R] Problem using read.xls - Everything converted to factors

2011-06-03 Thread Gabor Grothendieck
On Fri, Jun 3, 2011 at 10:24 AM, Sebastian Lerch wrote: > Hallo, > > I would like to use to read.xls function from the gdata package to read data > from Microsoft Excel files but I experienced a problem: For example I used > the following code: > > testfile<-read.xls("/home/.../wsjecon0603.xls", #

[R] VLOOKUP in R - tried everything.

2011-06-03 Thread bjmjarrett
I am attempting to emulate the VLOOKUP function from Excel in R. I want to compare one column (coll.minus.release) with another (release.days) to get the number of parasitoid released at that time (TotalParasitoids). for example: coll.minus.release release.daysParasitoidTotal -12

Re: [R] Counting occurrences in a moving window

2011-06-03 Thread mdvaan
Would it be possible to use the sqldf package and the ave function to simply run ave over a limited set? So something like: DF = data.frame(read.table(textConnection(" A B 8025 1995 8026 1995 8029 1995 8026 1996 8025 1997 8026 1997 8025 1997 8027 1997 8026 1999 8027 1999 802

Re: [R] Export a function from RCPP in R of type double

2011-06-03 Thread arvanitis
thnks for the reply regards christos -- View this message in context: http://r.789695.n4.nabble.com/Export-a-function-from-RCPP-in-R-of-type-double-tp3567793p3570165.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.or

[R] cor.test() running out of memory on 64-bit system

2011-06-03 Thread Alex Reynolds
I am running into resource issues with calculating correlation scores with cor.test(), on R 2.13.0: R version 2.13.0 (2011-04-13) ... Platform: x86_64-unknown-linux-gnu (64-bit) In my test case, I read in a pair of ~150M vectors from text files using the pipe() and scan() functions, which p

[R] Problem using read.xls - Everything converted to factors

2011-06-03 Thread Sebastian Lerch
Hallo, I would like to use to read.xls function from the gdata package to read data from Microsoft Excel files but I experienced a problem: For example I used the following code: testfile<-read.xls("/home/.../wsjecon0603.xls", #file path header=F, dec=",", na.

Re: [R] append date to write csv filename

2011-06-03 Thread vioravis
You could use the paste function to define the filename with date appended to it. See the example below: currentDate <- Sys.Date() csvFileName <- paste("C:/R/Remake/XPX",currentDate,".csv",sep="") write.csv(S1X.sub, file=csvFileName) -- View this message in context: http://r.789695.n4.nabble.c

[R] Not missing at random

2011-06-03 Thread Blaz Simcic
Hello!   I would like to sample 30 % of cases (with at least 1 value lower than 3) and among them I want to set all values lower than 3 (within selected cases) as NA (NMAR- Not missing at random). I managed to sample cases, but I don’t know how to set values (lower than 3) as NA.   R code:

[R] append date to write csv filename

2011-06-03 Thread michalseneca
Hi, can somebody help me or point me to thread on how to append the date to csv filename. something like write.csv(S1X.sub, file="C:/R/Remake/XPX110603.csv") Or any other date format. I just want to have some date in my file name.. Thanks Best >W Michael -- View this message in context:

[R] R and DBSCAN

2011-06-03 Thread Paco Pastor
Hello everyone, When looking for information about clustering of spatial data in R I was directed towards DBSCAN. I've read some docs about it and theb new questions have arisen. DBSCAN requires some parameters, one of them is "distance". As my data are three dimensional, longitude, latitude

Re: [R] heatmap question

2011-06-03 Thread Mark Aquino
Yes I understand what ? means, I meant is it possible to use this function (as an argument) with heatmap.2, but I learned I can use add.expr=mtext() to do that. However I'm not simply trying to add more text to the graph but rather move the display of the x-axis labels from the bottom of

Re: [R] "invalid times argument in rep function"

2011-06-03 Thread alfredo
Problem solved..it turned out there was a "NA" in one of the rows which was truncating "rep".. thanks anyway -- View this message in context: http://r.789695.n4.nabble.com/invalid-times-argument-in-rep-function-tp3570746p3571024.html Sent from the R help mailing list archive at Nabbl

Re: [R] Problem with package development

2011-06-03 Thread Bert Gunter
A fortunes candidate?? -- Bert > > If you don't recognize the official r-project.org R-admin manual as a > legitimate > link then I'm afraid I also can't help you any further since there is nothing > more legitimate than the official documentation. > > Sarah > > -- > Sarah Goslee > http://www.fu

Re: [R] Outputting data from TukeyHSD

2011-06-03 Thread Scott Chamberlain
Would this work for you, using the example in the TukeyHSD documentation? summary(fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)) temp <- TukeyHSD(fm1, "tension", ordered = TRUE) write.csv(data.frame(temp$tension), 'tukeyresults.csv') __Scott Chamberlain Rice Universi

Re: [R] predict witht he eha package

2011-06-03 Thread Terry Therneau
"Error in predict.coxph(f.ph.eha, newdata = mort, type = "lp") : Data is not the same size as it was in the original fit" This error message was added in a recent update to predict.coxph. If it needs to reconstruct some aspects from the original fit, such as the X matrix or strata vector, it ma

Re: [R] newton raphson

2011-06-03 Thread Ben Bolker
Uwe Ligges statistik.tu-dortmund.de> writes: > > Dear Jesper, > > since you want to write this yourself it is obvious this is a homework > problem. Please ask your supervisor for support on homeworks. > > Uwe Ligges > > On 02.06.2011 22:28, Jesper Hörnblad wrote: > > Hi > > > > I would like

Re: [R] censorReg/survreg

2011-06-03 Thread Terry Therneau
-- begin inclusion -- In addition, is there anyone knowing why censorReg does not exist in R and what's the difference between censorReg and survreg (besides the truncation)? ---end inclusion --- CensorReg and survreg were both developed in Splus, they fit the same models, both use maximum likeli

Re: [R] Adding a line to a beside=TRUE barplot

2011-06-03 Thread Galen Moore
Many thanks, it works beautifully! I'd not caught the use of colMeans() as the path to useable x-coordinates, and was fixated on the existing bargraph's x-vector for this purpose. Ref your Q, I guess I had the lattice reference in there as a vestige of other attempts to get the job done with barc

[R] Outputting data from TukeyHSD

2011-06-03 Thread Kevin Burnham
Hi All, I am wondering if their is a convenient way to export the results of the TukeyHSD function to Word or Excel. I have used capture.output(tukey.contrast, file="tukey.contrast.xls") and this works, but the data are not in a table form, and so it is sort of a pain to manipulate the output.

Re: [R] Is there a (virtual) class that all R objects inherit from?

2011-06-03 Thread Martin Morgan
On 06/03/2011 01:53 AM, Janko Thyson wrote: On 31.05.2011 18:17, Martin Morgan wrote: On 05/30/2011 07:02 AM, Janko Thyson wrote: Dear list, I would like to set one specific Reference Class field to be of an arbitrary class. Is there a class that all R objects inherit from? I thought that "ANY

[R] RES: RES: Recode numbers

2011-06-03 Thread Filipe Leme Botelho
Many thanks for this clever solution, it is much more elegant and efficient indeed. Cheers! -Mensagem original- De: Petr PIKAL [mailto:petr.pi...@precheza.cz] Enviada em: sexta-feira, 3 de junho de 2011 09:37 Para: Filipe Leme Botelho Cc: Lisa; r-help@r-project.org Assunto: Odp: [R] RES:

Re: [R] trheshold matrix

2011-06-03 Thread Uwe Ligges
On 03.06.2011 10:09, Alaios wrote: Dear all I want to put zeros and ones in matrix I have if the values are over a threshold For that I use: origBoolmap<- (origmap>thresh ) origBoolmap <- as.numeric(origmap>thresh ) should do it without need for any other code. Uwe Ligges origBool

Re: [R] Zero-inflated regression models: predicting no 0s

2011-06-03 Thread Michael Dewey
At 18:10 02/06/2011, geojs wrote: Thanks for the quick reply, I understand that the predict(zip1A, type = "response") command is computing the fitted_means and these are different than the probabilities predict(zip1A, type = "prob"). Although, according to Martin (2005), the highest probabilitie

[R] Odp: RES: Recode numbers

2011-06-03 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 01.06.2011 21:10:23: > "Filipe Leme Botelho" > Odeslal: r-help-boun...@r-project.org > > RES: [R] Recode numbers > > I think this is proper. > > a <- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2, > 3, 4) > b <- c(1, 5, 8, 9, 14

[R] Pareto Chart using GUI

2011-06-03 Thread Vikas Garud
Hi, I am exploring GUI's for doing Quality Management/Assurance/Improvement activities and this is another mail in series! Focus of this mail is Pareto Analysis for following data (Truncated): DateDefect code OperatorShift Machine Cost - Internal Cost - ExternalCost - To

Re: [R] GUI Experience - Box Plots

2011-06-03 Thread Vikas Garud
> A good place would be r-sig-gui. Regards > Liviu > Thanks Liviu. Subscribing to that list. Hope, it is still OK to write mails on these lists as well. Regards Vikas Garud __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] splom Tick Location

2011-06-03 Thread Deepayan Sarkar
On Tue, May 31, 2011 at 6:45 PM, Elliot Joel Bernstein wrote: > When using the 'splom' function of the 'lattice' packge, is it possible to > get all the tick marks in the outer margins of the plot? No. -Deepayan > > X <- as.data.frame(matrix(rnorm(1000), 100, 10)) > plot(X) ## Tick marks are in

[R] New version of rms package on CRAN

2011-06-03 Thread Frank Harrell
rms version 3.3-1 has been installed on CRAN. New features/bug fixes are below. * Added new example for anova.rms for making dot plots of partial R^2 of predictors * Defined logLik.ols (calls logLik.lm) * Fixed and cleaned up logLik.rms, AIC.rms * Fixed residuals.psm to allow oth

Re: [R] Using dates on axis with Grid plots

2011-06-03 Thread Deepayan Sarkar
On Thu, May 26, 2011 at 4:34 AM, Paul Murrell wrote: > Hi > > On 15/05/2011 2:01 a.m., Larry White wrote: >> >> Hi, >> >> I'm trying to use Grid plots and would like to have an X axis that >> represents dates. I have several years of data so I would like to be able >> to >> have labeled tick marks

Re: [R] Problem with package development

2011-06-03 Thread Barry Rowlingson
On Fri, Jun 3, 2011 at 11:51 AM, Sarah Goslee wrote: > If you don't recognize the official r-project.org R-admin manual as a > legitimate > link then I'm afraid I also can't help you any further since there is nothing > more legitimate than the official documentation. Except the source code! P

Re: [R] plot + axis: Individually moving tick labels with hadj?

2011-06-03 Thread Marius Hofert
Hi Sarah, very nice, thanks! Cheers, Marius On 2011-06-03, at 13:14 , Sarah Goslee wrote: > Hi Marius, > > I actually prefer the first (default) arrangement, with the labels centered, > but > if you want to align the equals under the tick mark one option is to use > axis() twice: > > plot(1

Re: [R] plot + axis: Individually moving tick labels with hadj?

2011-06-03 Thread Sarah Goslee
Hi Marius, I actually prefer the first (default) arrangement, with the labels centered, but if you want to align the equals under the tick mark one option is to use axis() twice: plot(1:5, 5:1, xaxt="n") axis(1, at=1:5, labels=c(1,2,"",4,5)) axis(1, at=3.15, tick=FALSE, labels=expression(3==beta[

Re: [R] GUI Experience - Box Plots

2011-06-03 Thread Liviu Andronic
On Fri, Jun 3, 2011 at 6:46 AM, Vikas Garud wrote: > Hi, > > This is to share my experience of using GUI's for using various > Quality Management/Assurance tools. > A few days back, I had I had written a mail about Box plots and > received some very good suggestions, including that for simple > sc

Re: [R] Value of 'pi'

2011-06-03 Thread Jim Lemon
On 06/01/2011 10:14 AM, baptiste auguie wrote: I propose a Pi Haiku (PIQ), Pi is of certain value, In statistics, invaluable, yet Transcending numerics. How about a pi limerick? Pi, the great circumferential, nearly sent the geometers mental. For they tried to extract a solution exact but one

[R] plot + axis: Individually moving tick labels with hadj?

2011-06-03 Thread Marius Hofert
Dear all, consider the following plot: plot(1:5, 5:1, xaxt="n") axis(1, at=1:5, labels=c(1,2,expression(3==beta[foo]),4,5)) the label at 3 is not nice, so consider this plot(1:5, 5:1, xaxt="n") axis(1, at=1:5, labels=c(1,2,expression(3==beta[foo]),4,5), padj=c(0,0,0.18,0,0)) Now

Re: [R] Problem with package development

2011-06-03 Thread Sarah Goslee
On Thu, Jun 2, 2011 at 11:48 PM, Nipesh Bajaj wrote: > This is how strange? How and from where I would know that I need to > install something pdflatex separately? Can you point some legitimate > link which says I need to install that (like Rtools?) Even this link > 'http://www.math.rug.nl/~trente

[R] GUI Experience - Box Plots

2011-06-03 Thread Vikas Garud
Hi, This is to share my experience of using GUI's for using various Quality Management/Assurance tools. A few days back, I had I had written a mail about Box plots and received some very good suggestions, including that for simple scripts. Thanks everybody for the same. Based on the suggestions,

Re: [R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Dimitris Rizopoulos
On 6/3/2011 12:32 PM, Federico Calboli wrote: On 3 Jun 2011, at 11:27, Dimitris Rizopoulos wrote: this sounds like a competing risks problem. Maybe you would be interested in a cause-specific hazard regression or the Fine& Gray model (http://cran.r-project.org/package=cmprsk). I will loo

Re: [R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Federico Calboli
On 3 Jun 2011, at 11:27, Dimitris Rizopoulos wrote: > this sounds like a competing risks problem. Maybe you would be interested in > a cause-specific hazard regression or the Fine & Gray model > (http://cran.r-project.org/package=cmprsk). I will look into that,but, biologically, parkinson leads

Re: [R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Dimitris Rizopoulos
this sounds like a competing risks problem. Maybe you would be interested in a cause-specific hazard regression or the Fine & Gray model (http://cran.r-project.org/package=cmprsk). Recently there was also a special issue in JSS on this topic (http://www.jstatsoft.org/v38). I hope it helps.

[R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Federico Calboli
I am writing to get a better handle on a warning I am getting from a coxph analysis I am doing. I am analysing age of onset of dementia *after* the onset of parkinson disease. My data looks like: age.park age.dem age.death censor x1 x2 x3 x4 1 76 8788 0 16 33 E3

Re: [R] barplot - change width of bar outline

2011-06-03 Thread Rolf Turner
U, addendum/correction. Forget what I said about cross-hatching. Without realizing it, I was looking at my own personal/local version of barplot.default, into which I'd built a cross-hatching capability. The ``real'' barplot.default doesn't have such a capability. Apparently R Core doesn

Re: [R] newton raphson

2011-06-03 Thread Uwe Ligges
Dear Jesper, since you want to write this yourself it is obvious this is a homework problem. Please ask your supervisor for support on homeworks. Uwe Ligges On 02.06.2011 22:28, Jesper Hörnblad wrote: Hi I would like to use the newton raphson method to find the root if the equation x^3-0.

[R] Importing JSON Hash Table

2011-06-03 Thread Philip Rhoades
People, I have found out how to create basic R hash tables and use "ls" and "get" and I can import my JSON hash table file with: x <- fromJSON( file="t.json" ) but if I have previously created x with: x = new.env(hash=T) - as soon as I import from the file, x stops being a hash table . .

[R] C-side: Applying a function (given as param) to data (given as param)

2011-06-03 Thread Oliver
Hello, I'm implementing a package (C-extension), where one function gets data and a function that needs to be applied to the data. I want to apply the function to (parts of) the data on the C-side. 1) how do I apply a function (given via SEXP) to data 2) how do I select parts of the data? Comme

Re: [R] Is there a (virtual) class that all R objects inherit from?

2011-06-03 Thread Janko Thyson
On 31.05.2011 18:17, Martin Morgan wrote: > On 05/30/2011 07:02 AM, Janko Thyson wrote: >> Dear list, >> >> I would like to set one specific Reference Class field to be of an >> arbitrary class. Is there a class that all R objects inherit from? I >> thought that "ANY" was something like this, but o

  1   2   >