Re: [R] Redhat Linux Install

2010-03-06 Thread Marc Schwartz
On Mar 5, 2010, at 3:45 PM, Ryan Garner wrote: I just installed R on Redhat Linux at work for the first time and have two questions. 1. I tried to install R to have png and cairo capabilities and was unsuccessful. Before running make, I ran ./configure --with-libpng=yes --with-x=no

Re: [R] Robust SE for lrm object

2010-03-06 Thread Frank E Harrell Jr
Achim Zeileis wrote: On Sat, 6 Mar 2010, David Winsemius wrote: On Mar 5, 2010, at 11:54 PM, Patrick Shea wrote: I'm trying to obtain the robust standard errors for a multinomial ordered logit model: mod6 - lrm(wdlshea ~ initdesch + concap + capasst + qualrat + terrain,data=full2)

[R] problem with extractAIC()

2010-03-06 Thread Jordi Moya
Dear friends, If I use: model-lm(y ~ x) and then extractAIC(model), the value that I obtain does not match (not even close): AIC=2*k-2*logLik(model) However, using AIC from the AICcmodavg(), the value matches exactly the above value. I read the help of extractAIC() and

[R] asdate parsing

2010-03-06 Thread ManInMoon
I have text date colum with dates such at 290210 which I can parse with %d%m%y but I also have date without leading zeo i.e. 10210 (Ist Feb 2010) which cause any NA. How can I parse the second one? -- View this message in context: http://n4.nabble.com/as-date-parsing-tp1582868p1582868.html

Re: [R] asdate parsing

2010-03-06 Thread Sarah Goslee
There are lots of ways to deal with text. One possibility would be to check the length with nchar(), and if it is 5, use paste() to add a 0 to the beginning. Granted, not elegant. Sarah On Sat, Mar 6, 2010 at 10:17 AM, ManInMoon xmoon2...@googlemail.com wrote: I have text date colum with dates

[R] Possible to use array of spline functions for storing data?

2010-03-06 Thread David Winsemius
Dear listeRs; I am hoping to provide myself the ability to interpolate mortality estimates within intervals for a range of conditions and ages. I have four mortality tables derived from the Society of Actuaries 2001 VBT tables that contains interval mortality rates by starting age and year

Re: [R] asdate parsing

2010-03-06 Thread Gabor Grothendieck
Try this. sprintf formats it with a leading 0 if necessary and then as.Date processes that: as.Date(sprintf(%06d, c(280210, 10210)), %d%m%y) Note Feb only has 28 days this year so I changed the example. On Sat, Mar 6, 2010 at 10:17 AM, ManInMoon xmoon2...@googlemail.com wrote: I have text

Re: [R] Possible to use array of spline functions for storing data?

2010-03-06 Thread Dieter Menne
David Winsemius wrote: Dear listeRs; I am hoping to provide myself the ability to interpolate mortality estimates within intervals for a range of conditions and ages. I have four mortality tables derived from the Society of Actuaries 2001 VBT tables that contains interval

Re: [R] Working with combinations

2010-03-06 Thread Herm Walsh
Erich- This approach would be great for my context.  However, in the code below I do not see how to restrict the output to the set of combinations I am looking for.  For example, suppose I am looking for the 10 two element combinations of 1:5.  Can you give me some psuedocode that shows how to

Re: [R] Working with combinations

2010-03-06 Thread Erich Neuwirth
currCombin - c(1,2) #this is the first possible combination 2 out if 5. Since the vector has length 2, we are doing 2 out of x here. selectedSet - NULL while (!is.na(currCombin)){ if(currCombin passes test) { selectedSet - rbind(selectedSet,currCombin) } currCombin -

Re: [R] Possible to use array of spline functions for storing data?

2010-03-06 Thread David Winsemius
On Mar 6, 2010, at 11:41 AM, Dieter Menne wrote: David Winsemius wrote: Dear listeRs; I am hoping to provide myself the ability to interpolate mortality estimates within intervals for a range of conditions and ages. I have four mortality tables derived from the Society of Actuaries 2001

[R] qoestion on insert a vector into a matrix

2010-03-06 Thread khazaei
Hi, I want to add a vector many time to rows of the matrix without use the loop. could you please hint me? thanks khazei __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] r code to generate interaction columns

2010-03-06 Thread Sharma, Dhruv
Hi, is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically? For e.g. there are 5 columns of data: A,B,C,D,E. CDE are numeric. Can someone provide code to automatically create more columns such as: 1) C*D, C*E, C*D*E,

[R] r code to generate interaction columns

2010-03-06 Thread Sharma, Dhruv
Hi, is there a way to take a dataset and extract numeric columns and create interaction columns from it automatically? For e.g. there are 5 columns of data: A,B,C,D,E. CDE are numeric. Can someone provide code to automatically create more columns such as: 1) C*D, C*E, C*D*E,

[R] SVGAnnotation in Windows

2010-03-06 Thread Cleber Borges
Does anyone know if there is SVGAnnotation package for Windows, and if so, a link to download? Thank you! Cleber N. Borges __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Is it possible to recursively update a function?

2010-03-06 Thread Uwe Ligges
It is not obvious to me if you can calculate f1, ..., f4, ... automatically or have to set them manually. Looks like you need to do it manually. In that case I'd suggest to write something along the lines: dose - c(-1.47, -1.1, -0.69, -0.42, 0.0, 0.42) f1 - function(x) exp(-x) f2 -

[R] color2D.matplot not giving colors

2010-03-06 Thread david hilton shanabrook
I am using color2D.matplot to plot a matrix about 400 by 200. The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green) #example motifx - matrix(NA,

Re: [R] SVGAnnotation in Windows

2010-03-06 Thread Uwe Ligges
On 06.03.2010 18:35, Cleber Borges wrote: Does anyone know if there is SVGAnnotation package for Windows, and if so, a link to download? A Google search reveals SVGAnnotation is an Omegahat hosted package. http://www.omegahat.org tells us to use install.packages(packageName, repos =

Re: [R] problem with extractAIC()

2010-03-06 Thread Uwe Ligges
On 06.03.2010 15:58, Jordi Moya wrote: Dear friends, If I use: model-lm(y ~ x) and then extractAIC(model), the value that I obtain does not match (not even close): AIC=2*k-2*logLik(model) However, using AIC from the AICcmodavg(), the value matches exactly the

Re: [R] Problem with package fpc

2010-03-06 Thread Uwe Ligges
On 02.03.2010 11:01, Sarah Paul wrote: I am trying to load package fpc in order to use the 'plotcluster' function however everytime I attempt to do so I get the following warning message: library(fpc) Loading required package: MASS Error: package 'MASS' could not be

Re: [R] Help with multtest (rawp2adjp)

2010-03-06 Thread Juliet Hannah
Some code to cut and paste would be helpful. The following may help out. library(multtest) # create some p-values p - runif(100) p - sort(p) p_adj - mt.rawp2adjp(p, proc=BH, alpha = 0.05) str(p_adj) List of 4 $ adjp : num [1:100, 1:2] 0.0142 0.0174 0.0254 0.0258 0.0736 ... ..- attr(*,

[R] Interpretation of 'swtich'

2010-03-06 Thread rkevinburton
In browsing the source I see the following construct: res - switch(type, working = , response = r, deviance = , pearson = if (is.null(object$weights)) r else r * sqrt(object$weights), partial = r) I understand that 'switch' will execute the code that is matched

Re: [R] Working with combinations

2010-03-06 Thread Herm Walsh
The usage here is exactly what I am looking for, thanks.  However this function seems to omit some combinations.  Continuing with the example below, given an always true condition in #***, it will only produce 7 combinations (omitting 1,5 1,4 and 2,5). Am I overlooking something that makes it

[R] TukeyHSD model thing

2010-03-06 Thread casperyc
Hi, I am trying to reproduce a tukey test in R == x=c(145,40,40,120,180, 140,155,90,160,95, 195,150,205,110,160, 45,40,195,65,145, 195,230,115,235,225, 120,55,50,80,45 ) y2=c( rep(as.character(1),5),

Re: [R] converting multiple lines of text to a data frame

2010-03-06 Thread Andrew Yee
Phil, thanks for your suggestion of unstack, which is just what I was looking for. Andrew On Fri, Mar 5, 2010 at 11:52 PM, Phil Spector spec...@stat.berkeley.edu wrote: Andrew-   Maybe something like this: dd = read.table(filename) unstack(dd,V2~V1)  A. B.   C. 1  1  2 10.0 2 34 20  6.7

[R] Fisher's LSD and tukey output thing

2010-03-06 Thread casperyc
Hi there, = x=c(145,40,40,120,180, 140,155,90,160,95, 195,150,205,110,160, 45,40,195,65,145, 195,230,115,235,225, 120,55,50,80,45 ) y2=c( rep(as.character(1),5), rep(as.character(2),5),

Re: [R] TukeyHSD model thing

2010-03-06 Thread Chuck Cleland
On 3/6/2010 4:38 PM, casperyc wrote: Hi, I am trying to reproduce a tukey test in R == x=c(145,40,40,120,180, 140,155,90,160,95, 195,150,205,110,160, 45,40,195,65,145, 195,230,115,235,225, 120,55,50,80,45 ) y2=c(

Re: [R] Plot interaction in multilevel model

2010-03-06 Thread William Revelle
I think both graphs will follow the same technique. This is partly laid out in how to do graphs of anova output at http://personality-project.org/r/r.plotregressions.html (which is part of the short (and out of date) guide to R for psychologists) http://personality-project.org/r/ At 6:39

Re: [R] qoestion on insert a vector into a matrix

2010-03-06 Thread jim holtman
Try this: x - matrix(0,10,5) vecToAdd - 1:5 # add to rows 1,4,8,9 # need to transpose because of the way matrix is filled # this does not give the right result x[c(1,4,8,9),] - vecToAdd x [,1] [,2] [,3] [,4] [,5] [1,]15432 [2,]00000 [3,]

Re: [R] problem with extractAIC()

2010-03-06 Thread Bill.Venables
Yes, you are missing something vital. The log-likelihood is only defined up to an additive constant. extractAIC and logLik use log-likelihoods with different additive constants, in general. (AIC my look uniquely defined, but since log-likelihood itself is not uniquely defined, nor is AIC.)

Re: [R] Heatmap reordering of dendrogram to hierarchical clustering

2010-03-06 Thread gireesh bogu
data(warpbreaks) ## given two factors coplot(breaks ~ 1:54 | wool * tension, data = warpbreaks, col = red, bg = pink, pch = 21, bar.bg = c(fac = light blue)) ## conditionalplot #

Re: [R] Plot interaction in multilevel model

2010-03-06 Thread RICHARD M. HEIBERGER
## dadrivr dadr...@gmail.com ## I suggest a lattice plot of all two-way interactions on the ## off-diagonals and all marginal main effects on the main diagonal. ## Please install HH and then ?interaction2wt for some examples. ## install.packages(HH) ## if you don't already have it library(HH)

Re: [R] Plotting Comparisons with Missing Data

2010-03-06 Thread Peter Ehlers
On 2010-03-05 18:00, Alastair wrote: Hi, I'm new to R and I've run into a problem that I'm not really sure how to express properly in the language. I've got a data table that I've read from a file containing some simple information about the performance of 4 algorithms. The columns are the

[R] some help

2010-03-06 Thread Ibrahim henaish
I am  working  on bayesian copula but i am new in this area and i do not have much knowledge about it. Does any one know  how to use  bayesian copula using R with winbugs? and estimating missing data by R?   hena...@yahoo.com sincerely [[alternative HTML version deleted]]

[R] How the change the dimension of an individual cell [i.e. the cell corresponding to an observation in data matrix] in a heatmap.2?

2010-03-06 Thread Sunny Srivastava
Dear R-Helpers, I have a short question related to heatmap.2 function. I wanted to change the dimension of each cell in the heatmap drawn by this function. here is a reproducible example from the help page library(gplots) data(mtcars) x - as.matrix(mtcars) rc - rainbow(nrow(x), start=0,

Re: [R] Gradient Boosting Trees with correlated predictors in gbm

2010-03-06 Thread Patrick Connolly
On Tue, 02-Mar-2010 at 02:43PM -0500, Liaw, Andy wrote: | In most implementations of boosting, and for that matter, single tree, | the first variable wins when there are ties. In randomForest the That still doesn't explain why with gbm, two identical variables will share the glory