Re: [R] SECOND MESSAGE: Re: Question about R an SPSS

2009-06-08 Thread Jim Porzak
Diego, Start with Bob Muenchen's site: http://www.rforsasandspssusers.com/ HTH, Jim Porzak TGN.com San Francisco, CA www.linkedin.com/in/jimporzak use R! Group SF: www.meetup.com/R-Users/ On Mon, Jun 8, 2009 at 5:47 PM, DIEGO CHAVEZ wrote: > Sent: Sunday, June 07, 2009 5:43 PM > Subject: Ques

Re: [R] ridiculous behaviour printing to eps: labels all messed

2009-06-08 Thread Eduardo Leoni
Perhaps you should try http://www.rforge.net/pgfSweave/ On Mon, Jun 8, 2009 at 5:38 PM, maiya wrote: > > Wow! Thank you for that Ted, a wonderfully comprehensive explanation and > now > everything makes perfect sense!! > > Regarding your last point, I would love to hear other people's experienc

Re: [R] SECOND MESSAGE: Re: Question about R an SPSS

2009-06-08 Thread Ronggui Huang
There is a technical report on comparison of R and other statistical software (http://www.ats.ucla.edu/stat/technicalreports/Number1/R_relative_statpack.pdf). You can have an overall view from this document. You may have better chance to get answers if you specify what you want to do and if R can

[R] SECOND MESSAGE: Re: Question about R an SPSS

2009-06-08 Thread DIEGO CHAVEZ
Sent: Sunday, June 07, 2009 5:43 PM Subject: Question about R an SPSS Dears Sirs: Venables, Smith and R-Development Core Team I am reading about the functional features of R statistical software, because I want to compare these progarm with the basic module of SPSS software. I woul

Re: [R] stars (as fourfold plots) in plot (symbols don't work)

2009-06-08 Thread maiya
I was feeling pretty silly when I saw there was actually a locations parameter in stars, as well as axes etc. But now the problem is that the x and y axes in stars must be on the same scale! Which unfortunately makes my data occupy only a very narrow band of the plot. I guess one option would be

Re: [R] ridiculous behaviour printing to eps: labels all messed

2009-06-08 Thread maiya
Wow! Thank you for that Ted, a wonderfully comprehensive explanation and now everything makes perfect sense!! Regarding your last point, I would love to hear other people's experience. I myself, as a complete newbie in both R and LaTeX, am perhaps not the best judge... But there are several graph

Re: [R] problem with bulk insert into a *.csv file

2009-06-08 Thread venkata kirankumar
Hi jim, I am caliculating these caliculation on quaring on 4 tables and preparing subsets of those and from there I am getting the final results that is "034P91"|"d947468f-95ff-4844-8d04-36619ed2cced"|1|"Control"|9686|"brain"|9301|7912|10746|10742|9710|12591|7933|12612|"Gram"|2.014|1.721|1.8902|0

[R] [R-help] how to install own R withour root?

2009-06-08 Thread Daofeng Li
Dear list members, i am currently want to install Rpy2 in a linux box which has R 2.4.0 installed RPy requries R 2.7.0 or above but i have no root previlleges so my question is how to install R 2.7.0 on my own directory? and replace the system installed R 2.4.0 when i input R command from the bash

[R] scatterplot (car) legend modification

2009-06-08 Thread sam stein
hi, new to R and using the car package to do some scatterplots with ellipses hoping to add the area and center points of each ellipse to the legend? looking for some direction / ideas here is the script, the data is where golf shots end up by club. x (dispersion), y (distance), g

Re: [R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread hadley wickham
On Mon, Jun 8, 2009 at 8:56 PM, Mao Jianfeng wrote: > Dear Ruser's > > I ask for helps on how to substitute missing values (NAs) by mean of the > group it is belonging to. > > my dummy dataframe is: > >> df >       group traits > 1  BSPy01-10     NA > 2  BSPy01-10    7.3 > 3  BSPy01-10    7.3 > 4  

Re: [R] Tinn R

2009-06-08 Thread Farrel
I posted a screen capture at http://groups.google.com/group/r-help-archive/web/TinnRplayswithR.png On Jun 8, 5:07 pm, "Karin & Martijn" wrote: > Dear R-users, > > I have installed the latest version of Tinn R (Version 2.2.0.2). > With the older versions it was possible to run Tinn R next to R an

Re: [R] Tinn R

2009-06-08 Thread Farrel
When I run Tinn-R I am able to activate the GUI or the Rterm. I am not quite sure what you mean. Options - Applications - R - Path normally allows one to set it up so that you want to work with it the way you describe. I will try post a screen capture. Alternatively you can post a video screencapt

Re: [R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread Jorge Ivan Velez
Dear Mao, Here is another way: yourdata$traits2 <- with(yourdata, do.call(c, tapply(traits, group, function(y){ ym <- mean(y,na.rm=TRUE) y[is.na(y)]<- ym

Re: [R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread David Winsemius
On Jun 8, 2009, at 9:56 PM, Mao Jianfeng wrote: Dear Ruser's I ask for helps on how to substitute missing values (NAs) by mean of the group it is belonging to. my dummy dataframe is: df group traits 1 BSPy01-10 NA 2 BSPy01-107.3 3 BSPy01-107.3 4 BSPy01-115.3 5

Re: [R] how to use "lapplyBy" function of "doBy" package

2009-06-08 Thread Gabor Grothendieck
Here are four ways: # using lapplyBy - DF is already sorted by group library(doBy) f <- function(x) { x$traits[is.na(x$traits)] <- mean(x$traits, na.rm = TRUE) x } do.call(rbind, lapplyBy(~ group, DF, f)) # using by - same f as before do.call(rbind, by(DF, DF$group, f)) # using

Re: [R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread Henrique Dallazuanna
Try this: d$traits[is.na(d$traits)] <- ave(d$traits, d$group, FUN=function(x)mean(x, na.rm = T))[is.na(d$traits)] On 6/8/09, Mao Jianfeng wrote: > Dear Ruser's > > I ask for helps on how to substitute missing

[R] how to use "lapplyBy" function of "doBy" package

2009-06-08 Thread Mao Jianfeng
Dear Ruser's I want to substitute each "NA" by the group mean of which the "NA" is belonging to. For example, substitute the first record of traits "NA" by the mean of "BSPy01-10" in the dummy dataframe. I have ever tried to solve this problem by using doBy package. But, I failed. I ask for the a

[R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread Mao Jianfeng
Dear Ruser's I ask for helps on how to substitute missing values (NAs) by mean of the group it is belonging to. my dummy dataframe is: > df group traits 1 BSPy01-10 NA 2 BSPy01-107.3 3 BSPy01-107.3 4 BSPy01-115.3 5 BSPy01-115.4 6 BSPy01-115.6 7 BSPy01-11

Re: [R] seq(...) strange logical value

2009-06-08 Thread Linlin Yan
How about this: > "%==%" <- function(x, y) { if (length(x) > 1) { sapply(x, function(z) isTRUE(all.equal(z, y))); } else { sapply(y, function(z) isTRUE(all.equal(z, x))); } } > seq(0, 1, by=0.1) %==% 0.1 [1] FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALS

Re: [R] Regex question to find a string that contains 5-9 alpha-numeric characters, at least one of which is a number

2009-06-08 Thread Marc Schwartz
On Jun 8, 2009, at 5:27 PM, Barry Rowlingson wrote: On Mon, Jun 8, 2009 at 10:40 PM, Tan, Richard wrote: Hi, This is not exactly an R question but I am trying to use gsub to replace a string that contains 5-9 alpha-numeric characters, at least one of which is a number. Is there a good wa

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Gabor Grothendieck
On Mon, Jun 8, 2009 at 7:18 PM, Wacek Kusnierczyk wrote: > Gabor Grothendieck wrote: >> Try this.  See ?regex for more. >> >> >>> x <- 'This happened in the 21. century." (the dot behind 21 is' >>> regexpr("(?![0-9]+)[.]", x, perl = TRUE) >>> >> [1] 24 >> attr(,"match.length") >> [1] 1 >> > > yes,

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Wacek Kusnierczyk
Gabor Grothendieck wrote: > Try this. See ?regex for more. > > >> x <- 'This happened in the 21. century." (the dot behind 21 is' >> regexpr("(?![0-9]+)[.]", x, perl = TRUE) >> > [1] 24 > attr(,"match.length") > [1] 1 > yes, but gregexpr('(?![0-9]+)[.]', 'a. 1. a1.', perl=TRUE)

[R] last.warning and Sweave?

2009-06-08 Thread Ben Bolker
Sweave does something clever with warnings, which I have so far been unable to figure out. There are a couple of threads on the list about this, but the best in here is a hack to redirect all the output and stick it back in. http://www.nabble.com/-R--Sweave-and-warning-messages-td7759353.html#

Re: [R] Regex question to find a string that contains 5-9 alpha-numeric characters, at least one of which is a number

2009-06-08 Thread Barry Rowlingson
On Mon, Jun 8, 2009 at 10:40 PM, Tan, Richard wrote: > Hi, > > This is not exactly an R question but I am trying to use gsub to replace > a string that contains 5-9 alpha-numeric characters, at least one of > which is a number.  Is there a good way to write it in a one line regex? The only way I

[R] Regex question to find a string that contains 5-9 alpha-numeric characters, at least one of which is a number

2009-06-08 Thread Tan, Richard
Hi, This is not exactly an R question but I am trying to use gsub to replace a string that contains 5-9 alpha-numeric characters, at least one of which is a number. Is there a good way to write it in a one line regex? Thanks, Richard __ R-help@r-proj

[R] Tinn R

2009-06-08 Thread Karin & Martijn
Dear R-users, I have installed the latest version of Tinn R (Version 2.2.0.2). With the older versions it was possible to run Tinn R next to R and then select code that one could send to R. Now it seems that one has to start the R gui in Tinn R and then it is possible to select en run code of R

Re: [R] if else

2009-06-08 Thread Stavros Macrakis
On Mon, Jun 8, 2009 at 3:36 PM, Don MacQueen wrote: Though I do agree that the way you've written the general case with any/ is.na and sum/na.rm is cleaner and clearer because more general, I don't agree at all with what you say about nested ifelse's vs. a series of assignments: > In my opinion

Re: [R] Re flect Back to Back Histograms in x-axis?

2009-06-08 Thread sedm1000
Thanks very much for that, most useful... Ted.Harding-2 wrote: > > On 08-Jun-09 13:11:03, sedm1000 wrote: >> I've looked long and hard for this, but maybe I am missing something... >> >> There is a nice module that displays histograms reflected in the >> y axis, i.e. >> http://addictedtor.fre

[R] Good Programming Practice Question - Functions in Different Files

2009-06-08 Thread Jason Rupert
I've gotten to the point wih an R script where I would like to encapsulate several blocks of codes in R functions. In order to keep the top level script simple I would like to put them in a separate file. This should help the readability of the top level main script. Is source(...) the best w

Re: [R] increase number of ticks on x axis of dates

2009-06-08 Thread Don MacQueen
After doing your plot command, type par()$usr This will give you the x and y axis ranges. Make sure that the "at" values you give are within the x-axis range. -Don At 2:59 PM -0400 6/8/09, Graves, Gregory wrote: My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000, etc.) fro

Re: [R] if else

2009-06-08 Thread Don MacQueen
I think one of the other good suggestions might have had a typo in it. And, I would like to append an alternate approach that can be generalized to more columns. In my opinion, nested ifelse() expressions are difficult to read and understand, and therefore difficult to get right. Easier to wr

Re: [R] increase number of ticks on x axis of dates

2009-06-08 Thread Gabor Grothendieck
The axis will use the internal representation of the dates. See R News 4/1 for more on that. On Mon, Jun 8, 2009 at 2:59 PM, Graves, Gregory wrote: > My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000, > etc.) from 2000 to end of 2008.  The default only gives me 4 ticks.  I > want

[R] spatstat: changing r limits when plot envelope

2009-06-08 Thread milton ruser
Dear all, I need to change the default of "r" when plotting the output of the envelope function of spatstat package. I can do this manually for the Lest output: ## Example from spatstat Kest help data(cells) L <- Lest(cells, correction="isotropic", r=seq(from=0,to=0.5, by=0.05)) x11(1000,400)

Re: [R] if else

2009-06-08 Thread Stavros Macrakis
On Mon, Jun 8, 2009 at 1:48 PM, Cecilia Carmo wrote: > I have the following dataframe: > firm<-c(rep(1:3,4)) > year<-c(rep(2001:2003,4)) > X1<-rep(c(10,NA),6) > X2<-rep(c(5,NA,2),4) > data<-data.frame(firm, year,X1,X2) > data > > So I want to obtain the same dataframe with a variable X3 that is:

Re: [R] increase number of ticks on x axis of dates

2009-06-08 Thread David Winsemius
Ask yourself: a) whether anyone could possibly see what you are seeing with the data you have offered, and ... (Just a guess that this is the problem) b) what POSIXct dates are represented by 1:9? Would they even be in the range 2001-2009? > ddd <- as.POSIXct(strptime(c("01/01/2000", "01

[R] increase number of ticks on x axis of dates

2009-06-08 Thread Graves, Gregory
My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000, etc.) from 2000 to end of 2008. The default only gives me 4 ticks. I want more. Why doesn't this work? sdate<-as.POSIXct(strptime(date,format="%m/%d/%Y")) plot(ppt~sdate,type="l",ylim=c(0,47),col=1,lwd=1,pch=16,ylab="S

Re: [R] if else

2009-06-08 Thread David Winsemius
On Jun 8, 2009, at 1:48 PM, Cecilia Carmo wrote: Hi R-helpers! I have the following dataframe: firm<-c(rep(1:3,4)) year<-c(rep(2001:2003,4)) X1<-rep(c(10,NA),6) X2<-rep(c(5,NA,2),4) data<-data.frame(firm, year,X1,X2) data So I want to obtain the same dataframe with a variable X3 that is: X1,

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread Juergen Rose
Am Montag, den 08.06.2009, 13:33 -0400 schrieb David Winsemius: > On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote: > > > Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: > >> Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: > >>> Dear Rose, > >>> > >>> no attached file came

Re: [R] if else

2009-06-08 Thread Chuck Cleland
On 6/8/2009 1:48 PM, Cecilia Carmo wrote: > Hi R-helpers! > > I have the following dataframe: > firm<-c(rep(1:3,4)) > year<-c(rep(2001:2003,4)) > X1<-rep(c(10,NA),6) > X2<-rep(c(5,NA,2),4) > data<-data.frame(firm, year,X1,X2) > data > > So I want to obtain the same dataframe with a variable X3 th

[R] if else

2009-06-08 Thread Cecilia Carmo
Hi R-helpers! I have the following dataframe: firm<-c(rep(1:3,4)) year<-c(rep(2001:2003,4)) X1<-rep(c(10,NA),6) X2<-rep(c(5,NA,2),4) data<-data.frame(firm, year,X1,X2) data So I want to obtain the same dataframe with a variable X3 that is: X1, if X2=NA X2, if X1=NA X1+X2 if X1 and X2 are not N

Re: [R] caret package

2009-06-08 Thread David Winsemius
The help page for extractPredictions suggests and testing confirms that the function expects a _list_ of models. The predict function is suggested as the method to get predictions from a single model. Giving the argument as a list does work with a single model, however: > predict(glmmat)

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Marc Schwartz
On Jun 8, 2009, at 12:34 PM, Marc Schwartz wrote: On Jun 8, 2009, at 9:15 AM, Mark Heckmann wrote: Hi, i need to recognize itemization structures in strings which follow the format: "digit-digit-dot" like e.g. 1. 2. 19. 211. Given the string " This happened in the 21. century."

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread David Winsemius
On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote: Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: Dear Rose, no attached file came with the message. bests milton I try once more to attache the file. I hope that 89 KB

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Gabor Grothendieck
Try this. See ?regex for more. > x <- 'This happened in the 21. century." (the dot behind 21 is' > regexpr("(?![0-9]+)[.]", x, perl = TRUE) [1] 24 attr(,"match.length") [1] 1 On Mon, Jun 8, 2009 at 10:15 AM, Mark Heckmann wrote: > Hi, > > > > i need to recognize itemization structures in string

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Marc Schwartz
On Jun 8, 2009, at 9:15 AM, Mark Heckmann wrote: Hi, i need to recognize itemization structures in strings which follow the format: "digit-digit-dot" like e.g. 1. 2. 19. 211. Given the string " This happened in the 21. century." (the dot behind 21 is used in German instead of 21st

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread David Winsemius
On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote: Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: Dear Rose, no attached file came with the message. bests milton I try once more to attache the file. I hope that 89 KB

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Henrique Dallazuanna
Try this: x <- "This happened in the 21. century." gregexpr("[[:digit:]]\\.", x) This returns the position of the digit-dot in the string. On Mon, Jun 8, 2009 at 11:15 AM, Mark Heckmann wrote: > Hi, > > > > i need to recognize itemization structures in strings which follow the > format: "digit

[R] Using survreg for Tobit

2009-06-08 Thread Anthony A. Pezzola
I am using survreg from the survival package to run a left censored tobit model on “non-survival” data. I have to four questions that I hope someone can help me with: 1) Is there anything I should take into consideration when using frailty() to estimate random intercepts? 2) Is there anyway o

Re: [R] SMACOF joint configuration plot with bread data? (Michael Kubovy)

2009-06-08 Thread Patrick Mair
Hi Michael, with res.uc$conf you'll get the single configurations for each rater. You can use these to produce the plot you want to have. Best, Patrick r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to r-help@r-project.org To subscribe or unsubscribe via t

[R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Mark Heckmann
Hi, i need to recognize itemization structures in strings which follow the format: "digit-digit-dot" like e.g. 1. 2. 19. 211. Given the string " This happened in the 21. century." (the dot behind 21 is used in German instead of 21st) I want know where the dots are but I do not want t

Re: [R] caret package

2009-06-08 Thread milton ruser
Dear Sunny Vic, I am forwarding it to the list, to help the helpers :-) bests.. milton On Mon, Jun 8, 2009 at 12:41 PM, sunny vic wrote: > Hi Milton, > here you go > > X1=rnorm(11, 50, 10) > X2=rnorm(11, 20, 10) > X3=rnorm(11, 50, 60) > X4=rnorm(11, 10, 2) > X5=rnorm(11, 5, 22) > > x<-cbind(

Re: [R] stars (as fourfold plots) in plot (symbols don't work)

2009-06-08 Thread Greg Snow
Here are 2 useful paths (it's up to you to decide if either is the right path). The my.symbols function in the TeachingDemos package allows you to create your own functions to create the symbols. But in this case, you can just use the locations argument to the stars function: > stars(cbind(1,sq

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread Juergen Rose
Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: > Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: > > Dear Rose, > > > > no attached file came with the message. > > > > bests > > milton > > I try once more to attache the file. I hope that 89 KB is not to large > for t

Re: [R] Survreg function for loglogistic hazard estimation

2009-06-08 Thread chenjiakai
Dear Terry, Thanks a lot for your reply. The result of survreg reads like: Call: survreg(formula = Surv(end, status) ~ fico_demean, data = raw, dist = "loglogistic", model = TRUE) Value Std. Error z p (Intercept) 2.98365 1.34e-03 2233.2 0.00e+00 fico_demean

Re: [R] help to speed up loops in r

2009-06-08 Thread Bert Gunter
AFAICS, the problem is that you have not (carefully?) read the docs and are approaching R as a C programmer and not taking a whole object point of view. The loop is completely unnecessary! PLEASE READ AN INTRO TO R (again,perhaps) before posting. So, unless I misunderstand (and my apologies if I d

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread Juergen Rose
Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: > Dear Rose, > > no attached file came with the message. > > bests > milton I try once more to attache the file. I hope that 89 KB is not to large for the mailing list. > On Mon, Jun 8, 2009 at 12:20 PM, Juergen Rose > wrote: >

Re: [R] Strange indices of support verctors from e1071

2009-06-08 Thread Juergen Rose
Am Montag, den 08.06.2009, 18:20 +0200 schrieb Juergen Rose: > Hello, > > In the attached file training.csv (I apologize for the large file) I > have 238 objects belonging to 13 classes, which are described by 183 > properties. I would like to find a svm model for these objects. > > I tried the f

[R] Strange indices of support verctors from e1071

2009-06-08 Thread Juergen Rose
Hello, In the attached file training.csv (I apologize for the large file) I have 238 objects belonging to 13 classes, which are described by 183 properties. I would like to find a svm model for these objects. I tried the following R statements. library('e1071') datatraining <- read.csv("training

Re: [R] RPostgreSQL segfault with LEFT JOIN

2009-06-08 Thread Dylan Beaudette
On Sunday 07 June 2009, Dirk Eddelbuettel wrote: > On 7 June 2009 at 06:40, Neil Tiffin wrote: > | I am adding your note to google code issues > | (http://code.google.com/p/rpostgresql/issues/list ), issue Number 1. > | Normally I monitor R-SIG-DB > | (https://stat.ethz.ch/mailman/listinfo/r-sig-d

Re: [R] problem with bulk insert into a *.csv file

2009-06-08 Thread jim holtman
You can always open a connection and write the rows out as you have calculated them. It would be nice if you had included at least a subset of the calculations that you are doing so that we can understand the problem you are trying to solve. On Mon, Jun 8, 2009 at 11:43 AM, venkata kirankumar wro

Re: [R] help to speed up loops in r

2009-06-08 Thread Jorge Ivan Velez
Dear Amit, The following should get you started: # Some data set.seed(123) X <- matrix(rnorm(20*10), ncol=10) X # Group of replicates g <- rep(1:(ncol(X)/2), each=2) g # Mean of replicate variables t(apply(X, 1, tapply, g, mean, na.rm = TRUE)) I created a grouping variable (g) and then calculat

Re: [R] caret package

2009-06-08 Thread milton ruser
Hi Sonny Vic, how about you send a reproducible code? cheers milton On Mon, Jun 8, 2009 at 11:25 AM, sunny vic wrote: > Hi all > I am using the caret package and having difficulty in obtaining the > results > using regression, I used the glmnet to model and trying to get the > coefficients an

[R] help to speed up loops in r

2009-06-08 Thread Amit Patel
Hi i am using a script which involves the following loop. It attempts to reduce a data frame(zz) of 95000 * 41 down to a data frame (averagedreplicates) of 95000 * 21 by averaging the replicate values as you can see in the script below. This script however is very slow (2days). Any suggestions

[R] DSC 2009, scientific programme

2009-06-08 Thread Peter Dalgaard
The as-good-as final scientific programme has been posted on the conference website http://www.r-project.org/dsc-2009 The absolutely final date for regular registration is July 5, but earlier registration is preferred and certainly recommended if you wish to book hotels via the conference bureau.

Re: [R] Looking for easy way to normalize data by groups

2009-06-08 Thread hadley wickham
On Mon, Jun 8, 2009 at 10:29 AM, Herbert Jägle wrote: > Hi, > > i do have a dataframe representing data from a repeated experiment. PID is a > subject identifier, Time are timepoints in an experiment which was repeated > twice. For each subject and all three timepoints there are 2 sets of four > va

[R] problem with bulk insert into a *.csv file

2009-06-08 Thread venkata kirankumar
Hi all, I am trying to create a "index.csv" with caliculating different types of caliculations . In that i have to caliculate on 10,000 studies and have to insert many no of rows more than 500,000 for that right now I am inserting every row after caliculating and doing data.frame but its

[R] Looking for easy way to normalize data by groups

2009-06-08 Thread Herbert Jägle
Hi, i do have a dataframe representing data from a repeated experiment. PID is a subject identifier, Time are timepoints in an experiment which was repeated twice. For each subject and all three timepoints there are 2 sets of four values. df <- data.frame(PID = c(rep("A", 12), rep("B", 12),

[R] caret package

2009-06-08 Thread sunny vic
Hi all I am using the caret package and having difficulty in obtaining the results using regression, I used the glmnet to model and trying to get the coefficients and the model parameters I am trying to use the extractPrediction to obtain a confusion matrix and it seems to be giving me errors.

[R] ReadItem: unknown type 136, perhaps written by later version of R

2009-06-08 Thread Patrizio Frederic
Dear all, I use at least two pc to perform my data analysis. Both are powered with R updated at the latest release (currently 2.9.0 under windows xp pro). I bring .Rdata on my portable drive and use them on any of my pc (this worked also under (k)ubuntu equipped machines). Please notice that not al

Re: [R] forestplot function in rmeta package

2009-06-08 Thread Michael Dewey
At 08:38 08/06/2009, carol white wrote: Hi, It is known that the area of square plotted by forestplot is proportional to the studies' weights. But since there is not weight parameter in forestplot function, how does this function proportion the area of each square based on the related study's

Re: [R] Re flect Back to Back Histograms in x-axis?

2009-06-08 Thread Ted Harding
On 08-Jun-09 13:11:03, sedm1000 wrote: > I've looked long and hard for this, but maybe I am missing something... > > There is a nice module that displays histograms reflected in the > y axis, i.e. > http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136 > > but is it possible to reflec

[R] Re flect Back to Back Histograms in x-axis?

2009-06-08 Thread sedm1000
I've looked long and hard for this, but maybe I am missing something... There is a nice module that displays histograms reflected in the y axis, i.e. http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136 but is it possible to reflect in the x-axis, so to have two datasets, one pointi

Re: [R] Survreg function for loglogistic hazard estimation

2009-06-08 Thread Terry Therneau
---begin included message -- I am trying to use R to do loglogistic hazard estimation. My plan is to generate a loglogistic hazard sample data and then use survreg to estimate it. If everything is correct, survreg should return the parameters I have used to generate the sample data. I have w

Re: [R] Heatmap

2009-06-08 Thread Jorge Ivan Velez
Dear Alex, Take a look at the examples in # Option 1 ?heatmap # Option 2 require(gplots) ?heatmap.2 HTH, Jorge On Mon, Jun 8, 2009 at 9:32 AM, Alex Roy wrote: > Hello Group, >How can I draw heatmap with variable names in the plot? > > Thanks > > Alex > >[[alterna

Re: [R] Random Forest % Variation vs Psuedo-R^2?

2009-06-08 Thread Liaw, Andy
It actually means that the MSE (0.04605) is 130.42% of var(y), thus the model had not provided any better explanatory power than predicting by mean(y). The pseudo R^2 is just 100% - 130.42% = -30.42%. Remember that this is not the resubstituttion estimate because it is computed from the OOB estim

Re: [R] seq(...) strange logical value

2009-06-08 Thread Wacek Kusnierczyk
Allan Engelhardt wrote: > See > http://wiki.r-project.org/rwiki/doku.php?id=misc:r_accuracy:decimal_numbers#sequences_of_decimal_numbers > > as usual, be careful about what is advertised in r docs and related texts. on the r_accuracy page, you'll read: "For further information, see the digit

Re: [R] Heatmap

2009-06-08 Thread Liaw, Andy
Couldn't you get that just by giving heatmap() the transpose of your data? > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Alex Roy > Sent: Monday, June 08, 2009 9:32 AM > To: r-help@r-project.org > Subject: [R] Heatmap > >

Re: [R] ridiculous behaviour printing to eps: labels all messed

2009-06-08 Thread Ted Harding
On 08-Jun-09 06:23:04, Peter Dalgaard wrote: > maiya wrote: >> OK, this is really weird! >> >> here's an example code: >> >> t1<-c(1,2,3,4) >> t2<-c(4,2,4,2) >> plot(t1~t2, xlab="exp1", ylab="exp2") >> dev.copy2eps(file="test.eps") >> >> that all seems fine... >> >> until you look at the eps fi

[R] Heatmap

2009-06-08 Thread Alex Roy
Hello Group, How can I draw heatmap with variable names in the plot? Thanks Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] seq(...) strange logical value

2009-06-08 Thread Allan Engelhardt
See http://wiki.r-project.org/rwiki/doku.php?id=misc:r_accuracy:decimal_numbers#sequences_of_decimal_numbers and also http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Grześ wrote: > Do you heve any idea why I get after this instruction everywh

Re: [R] seq(...) strange logical value

2009-06-08 Thread Allan Engelhardt
http://wiki.r-project.org/rwiki/doku.php?id=misc:r_accuracy:decimal_numbers http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Grześ wrote: > Do you heve any idea why I get after this instruction everywhere false? > >> seq (0, 1, by=0.1) == 0.3

[R] Odp: seq(...) strange logical value

2009-06-08 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 08.06.2009 10:45:15: > > Do you heve any idea why I get after this instruction everywhere false? > > seq (0, 1, by=0.1) == 0.3 > [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > > But after different step it's ok: > > seq(0, 1,

Re: [R] Must be a better way to collate sequenced data

2009-06-08 Thread Petr PIKAL
Hi "Burke, Robin" napsal dne 08.06.2009 11:28:46: > Thanks for the quick response. Sorry for being unclear with my example. Here > is something more concrete: > > user <- c(1, 2, 1, 2, 3, 1, 3, 4, 2, 3, 4, 1); > time <- c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200); >

Re: [R] ridiculous behaviour printing to eps: labels all messed up!

2009-06-08 Thread maiya
Solution!! Peter, that seems to do the trick! dev.copy2eps(file="test.eps", useKerning=FALSE) correctly places the labels without splitting them! the same also works with postscript() of course. I also found another thread where this was solved http://www.nabble.com/postscript-printer-breakin

[R] help with plot.boot

2009-06-08 Thread David A.G
Dear list, this might be a silly question, but I am a bit lost I have bootstrapped the C-index of a logistic regression model, 500 times. > results <- boot(data=data,statistic=cindex,R=500,formula = myformula) When I plot the results I get a histogram of the bootstrapped where the Y axis is

[R] [R-pkgs] (ORPHANED) rimage 0.5-8 package uploaded

2009-06-08 Thread Jeffrey Lewis
Hi, With the help of Dirk Eddelbuettel, I was able to fix a few little problems that prevented the rimage (0.5-7) package from working under (at least) R 2.8 or 2.9 and g++ 4.2 or 4.3. I have uploaded a new release, 0.5-8, that fixes these problems. It have attempted to contact the package'

Re: [R] Must be a better way to collate sequenced data

2009-06-08 Thread Burke, Robin
Thanks for the quick response. Sorry for being unclear with my example. Here is something more concrete: user <- c(1, 2, 1, 2, 3, 1, 3, 4, 2, 3, 4, 1); time <- c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200); userCount <- c(1, 1, 2, 2, 1, 3, 2, 1, 3, 3, 2, 4); period <- 10

[R] seq(...) strange logical value

2009-06-08 Thread Grześ
Do you heve any idea why I get after this instruction everywhere false? > seq (0, 1, by=0.1) == 0.3 [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE But after different step it's ok: > seq(0, 1, by=0.1) == 0.4 [1] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE

Re: [R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
On Mon, Jun 8, 2009 at 3:04 PM, baptiste auguie wrote: > Marie Sivertsen wrote: > >> Dear list, >> >> I have a vector of elements which I want to combined each with each, but >> none with itself. For example, >> >> >> >>> v <- c("a", "b", "c") >>> >>> >> >> and I need a function 'combine' such tha

Re: [R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
Thank you both Dimitiris and Jorge Ivan! I have just found it myself that 'combn' does what I need: > combn(v, 2, simplify=TRUE) is exactly what I need. Mvh., Marie On Mon, Jun 8, 2009 at 3:03 PM, Dimitris Rizopoulos < d.rizopou...@erasmusmc.nl> wrote: > one way is: > > combn(c("a", "b",

Re: [R] Combining elements of vectors

2009-06-08 Thread baptiste auguie
Marie Sivertsen wrote: Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, v <- c("a", "b", "c") and I need a function 'combine' such that combine(v) [[1]] [1] "a" "b" [[2]] [1] "a" "b" [[3]] [1] "b" "c" I a

Re: [R] Combining elements of vectors

2009-06-08 Thread Dimitris Rizopoulos
one way is: combn(c("a", "b", "c"), 2) I hope it helps. Best, Dimitris Marie Sivertsen wrote: Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, v <- c("a", "b", "c") and I need a function 'combine' such that combine(v)

Re: [R] mean

2009-06-08 Thread amor Gandhi
Many thanks --- milton ruser schrieb am Mo, 8.6.2009: Von: milton ruser Betreff: Re: [R] mean An: "amor Gandhi" CC: r-h...@stat.math.ethz.ch Datum: Montag, 8. Juni 2009, 14:27 oops.   If x1 is the individual try   x2.mean<-aggregate(data[2:2], list(x1), mean) x2.mean you can change "mean" by

Re: [R] Combining elements of vectors

2009-06-08 Thread Jorge Ivan Velez
Dear Marie, Try this: combn(v,2,list) HTH, Jorge On Mon, Jun 8, 2009 at 8:56 AM, Marie Sivertsen wrote: > Dear list, > > I have a vector of elements which I want to combined each with each, but > none with itself. For example, > > > v <- c("a", "b", "c") > > and I need a function 'combine' su

[R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, > v <- c("a", "b", "c") and I need a function 'combine' such that > combine(v) [[1]] [1] "a" "b" [[2]] [1] "a" "b" [[3]] [1] "b" "c" I am not very interested in the orders of th

Re: [R] mean

2009-06-08 Thread baptiste auguie
Ben Bolker wrote: amor Gandhi wrote: Hi, I have gote the following data x1 <- c(rep(1,6),rep(4,7),rep(6,10)) x2 <- rnorm(length(x1),6,1) data <- data.frame(x1,x2) and I would like to compute the mean of the x2 for each individual of x1, i. e. x1=1,4 and 6? You'll probably get sev

Re: [R] mean

2009-06-08 Thread milton ruser
oops. If x1 is the individual try x2.mean<-aggregate(data[2:2], list(x1), mean) x2.mean you can change "mean" by any function. cheers milton On Mon, Jun 8, 2009 at 8:20 AM, milton ruser wrote: > Hi Amor, > I think you forgot to include the individual ID. > ?aggregate > > cheers > milton > br

Re: [R] mean

2009-06-08 Thread milton ruser
Hi Amor, I think you forgot to include the individual ID. ?aggregate cheers milton brazil=toronto On Mon, Jun 8, 2009 at 8:11 AM, amor Gandhi wrote: > Hi, > > I have gote the following data > > x1 <- c(rep(1,6),rep(4,7),rep(6,10)) > x2 <- rnorm(length(x1),6,1) > data <- data.frame(x1,x2) > > an

Re: [R] mean

2009-06-08 Thread Ben Bolker
amor Gandhi wrote: > > Hi, > > I have gote the following data > > x1 <- c(rep(1,6),rep(4,7),rep(6,10)) > x2 <- rnorm(length(x1),6,1) > data <- data.frame(x1,x2) > > and I would like to compute the mean of the x2 for each individual of x1, > i. e. x1=1,4 and 6? > You'll probably get seven

Re: [R] mean

2009-06-08 Thread Dimitris Rizopoulos
sorry, that should be tapply(x2, x1, mean) Best, Dimitris Dimitris Rizopoulos wrote: have a look at ?tapply(), e.g., x1 <- c(rep(1,6),rep(4,7),rep(6,10)) x2 <- rnorm(length(x1),6,1) tapply(x1, x1, mean) I hope it helps. Best, Dimitris amor Gandhi wrote: Hi, I have gote the following

  1   2   >