Re: [R] R Error

2008-11-21 Thread Peter Dalgaard
Rolf Turner wrote: On 21/11/2008, at 10:13 AM, Steffy, Elizabeth A. wrote: I got this error for this equation and i'm not sure what it means or how to fix it: Error in S[index] = S[index - 1] + (dSi - dSo - SC) * dt : nothing to replace with Does anyone know how to fix this? No.

[R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
Hi I am trying to figure out, if the matlab style of linear indexing of an array is the same as in R. i.e. when x - array( 1:24, dim=c(2,3,4) ) x[3] 3 and if the same is true in matlab, assuming that x[n1,n2,n3] in R returns the same as y(n1,n2,n3) when y is a matrix in matlab I found the

[R] select specific listcomponents to calculate the means

2008-11-21 Thread Tom Cohen
Dear list, I have following list [[1]] Pnr timeCA CACen 1 62083014541 0.008 TRUE 2 62083014542 0.008 TRUE 3 62083014543 0.008 FALSE 4 62083014544 0.013 TRUE 5 62083014545 0.007 FALSE [[2]] Pnr timeCA CACen 1 6403147116

Re: [R] R Error

2008-11-21 Thread Dieter Menne
Error in S[index] = S[index - 1] + (dSi - dSo - SC) * dt : nothing to replace with Peter Dalgaard wrote: ...that her R version is from before September 2008. Just curious which item in NEWS this comment refers to. Something changed in [] ? Dieter -- View this message in context:

Re: [R] generate random number

2008-11-21 Thread Odette Gaston
Hi Dimitris, Appreciate for your reply with detailed information, many thanks! I realize that generating random number won't be so simple more than I expected, but got some hints from the advice. I am actually hoping to do a parametric bootstrap likelihood test, because this is the way of

[R] ggplot2 - Problem with geom_abline()

2008-11-21 Thread David Hajage
Hello, Sorry to ask again something with ggplot2... I detect something, perhaps a bug (but more probably a syntax error, I'm learning...) : # This is working : x = wt, y = mpg, abline with intercept = 20 and slope = 1 qplot(wt, mpg, data = mtcars) + geom_abline(intercept = 20, slope = 1) # This

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-21 Thread Gerit Offermann
Dear list, thanks to your help I managed to find means of analysing my data. However, the whole data set contains 264 variables. Of which some are factors, others are not. The factors tend to be grouped, e.g. data$f1304 to data$f1484 and data$f3204 to data$5408. But there are other types of

Re: [R] R Error

2008-11-21 Thread Peter Dalgaard
Dieter Menne wrote: Error in S[index] = S[index - 1] + (dSi - dSo - SC) * dt : nothing to replace with Peter Dalgaard wrote: ...that her R version is from before September 2008. Just curious which item in NEWS this comment refers to. Something changed in [] ? No, it was just the

Re: [R] R course in Scotland

2008-11-21 Thread Heather Turner
Hello Peter, If you want to use R for bioinformatics, you probably want a course using Bioconductor (www.bioconductor.org). To combine with a introduction to R, the following should be good: http://www3.imperial.ac.uk/stathelp/courses/statisticalmicroarrayanalysisusingr but some time to wait

[R] a trous wavelet transform in R ?

2008-11-21 Thread mauede
There may be some chance that a proper wavelet transform may help me with signal features extraction. I know R contains a number of packages implementing wavelett filters and/or transforms. Is there an implementation of a trous wavelet transform ? Thank you so much, Maura Alice Messenger ;-)

[R] Simulation Result display form

2008-11-21 Thread Abelian
after obtaining the result, the result is displayed below: individual RS_number Phy_Posi LOH_intensity 1 1718890 rs1496555 2.2241110.8121 2 1668776 rs2376495 3.0849860.786 --- 3 1723597 rs4648462 3.1551270.784 --- 4 1728870 rs10492940 3.1876070.7831

[R] timezone attribute lost during operations

2008-11-21 Thread Thomas Mang
Hi, I was just *highly* surprised to find out that R 2.8.0 (Windows XP) changes the timezone-interpretation during operations on time data, as apparently the timezone attribute is lost and then, for the next interpretation of the timezone, the system settings are used. Here is sample code

[R] Extracting diagonal matrix

2008-11-21 Thread A Ezhil
Dear All, I have a correlation matrix of size 100 x 100 and would like to extract the diagonal matrix from it. I have used the for loop to store tha correlation values of the diagonal matrix. Is there a 'R way' of doing this? Thanks in advance. Kind regards, Ezhil

Re: [R] Extracting diagonal matrix

2008-11-21 Thread Rory.WINSTON
Try ?diag Rory Winston RBS Global Banking Markets Office: +44 20 7085 4476 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of A Ezhil Sent: 21 November 2008 12:28 To: r-help@r-project.org Subject: [R] Extracting diagonal matrix Dear All, I have a

Re: [R] Extracting diagonal matrix

2008-11-21 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Try ?diag Or, if he really means the diagonal of a 100x100 correlation matrix, rep(1,100) :-) Rory Winston RBS Global Banking Markets Office: +44 20 7085 4476 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of A

[R] [R-pkgs] ggplot2 - version 0.8

2008-11-21 Thread hadley wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle

Re: [R] Math Expression in 3D Plots

2008-11-21 Thread Duncan Murdoch
Alan Lue wrote: Is there anyway to label axes in 3D plots with mathematical expressions? In the code below, I want to replace delta_yrsed with what \Delta \widehat{yrsed} represents in TeX, but the [xyz]lab parameters of title3d appear to only accept character strings. Unfortunately,

Re: [R] summary statistics into table/data base, many factors to analyse

2008-11-21 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 21.11.2008 11:50:52: Dear list, thanks to your help I managed to find means of analysing my data. However, the whole data set contains 264 variables. Of which some are factors, others are not. The factors tend to be grouped, e.g. data$f1304 to data$f1484

Re: [R] post - plotting lines in a divided graphic device

2008-11-21 Thread Prof Brian Ripley
On Fri, 21 Nov 2008, _ wrote: Hi all, I have a graphic device divided in 2 areas for a plot. Is it possible to add lines or points in the first plot after the last one have been set, without plotting all the data again ? See ?par, look at mfg. However, you would probably find screen()

Re: [R] R course in Scotland

2008-11-21 Thread Peter Saffrey
Thanks to the many people on the list who provided helpful responses, including those who Emailed me directly. Several people have suggested that I just pick up R and give it a try. My reluctance to do this is that I am already very familiar with my current working method (Python + Numpy) and

[R] write every element of a variable into a separate text-file

2008-11-21 Thread zuber
Hello, what I want to do, is, to write every element of a variable into a separate text-file automatically: My Variable: wull [1] Hallo Leute, wie gehts denn euch seid ihr noch alle... [2] Is their anyone how can help me with... [3] mann, mann, mann... das nervt aber..

Re: [R] Extracting diagonal matrix

2008-11-21 Thread A Ezhil
Thanks. I would like to extract all the matrix entries below or above the diagnol. diag(x) simply gives diagonal elements. Thanks. Kind regards, Ezhil --- On Fri, 11/21/08, Peter Dalgaard [EMAIL PROTECTED] wrote: From: Peter Dalgaard [EMAIL PROTECTED] Subject: Re: [R] Extracting diagonal

[R] post - plotting lines in a divided graphic device

2008-11-21 Thread _
Hi all, I have a graphic device divided in 2 areas for a plot. Is it possible to add lines or points in the first plot after the last one have been set, without plotting all the data again ? Example par(mfrow(2,1)) plot(1) plot(2) lines(c(1,2)) # should be visible in the first plot Thanks

Re: [R] Extracting diagonal matrix

2008-11-21 Thread Henrique Dallazuanna
See ?upper.tri and ?lower.tri. On Fri, Nov 21, 2008 at 1:05 PM, A Ezhil [EMAIL PROTECTED] wrote: Thanks. I would like to extract all the matrix entries below or above the diagnol. diag(x) simply gives diagonal elements. Thanks. Kind regards, Ezhil --- On Fri, 11/21/08, Peter Dalgaard

Re: [R] write every element of a variable into a separate text-file

2008-11-21 Thread Sarah Goslee
Well, you could read the R Data Import/Export manual. Or you could reread the help for write and figure out what the append argument does. Or you could reread the help for write and notice that it should write out your entire variable without requiring a loop. Sarah On Fri, Nov 21, 2008 at 8:39

Re: [R] Extracting diagonal matrix

2008-11-21 Thread Stavros Macrakis
You can also do it from first principles: outer(1:100,1:100,``) * m which generalizes nicely to , =, =, !=, etc. -s On 11/21/08, Henrique Dallazuanna [EMAIL PROTECTED] wrote: See ?upper.tri and ?lower.tri. __ R-help@r-project.org

Re: [R] R course in Scotland

2008-11-21 Thread Richard Cotton
pzs wrote: Several people have suggested that I just pick up R and give it a try. My reluctance to do this is that I am already very familiar with my current working method (Python + Numpy) and I worry that without a course I will work in a Python-centric way, which won't be optimal.

Re: [R] write every element of a variable into a separate text-file

2008-11-21 Thread Jagat.K.Sheth
Your code isn't changing the filename Try this for(i in seq_along(wull)) write(wull[i], paste(C://Users//zuber//Documents//wull(,i,),.txt,sep=)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, November 21, 2008 7:39 AM

Re: [R] Extracting diagonal matrix

2008-11-21 Thread Anup Menon
Hi Ezhil, Maybe this will help. There might be an easier way to do this but here is one solution. tril - function(A) { A - as.matrix(A) cmats - matrix(rep(1,length(A)),dim(A)[1],dim(A)[2]) upper.tri(cmats,diag=T) cmats[upper.tri(cmats)] - 0 out - A*cmats return(out) }

[R] Dataframe with single level column

2008-11-21 Thread Blanchette, Marco
Dear all, I have a dataframe with multiple observations and the levels as the last column, as in: d - data.frame(A=sample(1:100,12),B=sample(1:100,12),levels=c(rep('A',4),rep('B',4),rep('C',4))) d A B levels 1 77 40 A 2 14 18 A 3 56 7 A 4 46 27 A 5 63 35 B 6

[R] Breakdown of Vector

2008-11-21 Thread Rajasekaramya
Hi, I have a vector of Size 7420. I wanna break down in such a way that every 20 elements of it should be as elements of an list. Ex EXAM1 ABC, SDF, LMN,ERF,EGC,EFG,WER,FRE,QWE,ERT,DGW,QWE,YUR,ERT,GHJ,FHH,7420 what i want is Breakdown.list [[1]] ABC,SDF,.20 [[2]] 21.40 [[3]]

Re: [R] glmer for cauchit link function

2008-11-21 Thread Douglas Bates
On Thu, Nov 20, 2008 at 5:38 PM, Lizz Metcalfe [EMAIL PROTECTED] wrote: I am trying to fit a generalized linear mixed effects model with a binomial link function, my response data is binary, using the lme4 R package, for the glmer model but with the cauchit link function (CDF of Cauchy

Re: [R] Dataframe with single level column

2008-11-21 Thread Stefan Große
I need to run anova analyis on the group in levels against the merge data in the first two columns. I can manually split and join the different columns as in d.t - rbind(data.frame(value=d[,1],ind=d[,3]),data.frame(value=d[,2],ind=d[,3])) but I was wondering if there would be a more

Re: [R] matlab style of storing arrays compared to R

2008-11-21 Thread Douglas Bates
R uses column-major ordering of multidimensional arrays, as in Fortran, unlike the row-major ordering of C multidimensional arrays. This is because the numerical linear algebra code used in R is from the Eispack, Linpack, BLAS, Lapack family of Fortran subroutine packages. Even when

Re: [R] syntax and package for generalized linear mixed models

2008-11-21 Thread Douglas Bates
On Thu, Nov 20, 2008 at 2:54 PM, Jeff Evans [EMAIL PROTECTED] wrote: I am making the switch to R and uncertain which of the several packages for mixed models is appropriate for my analysis. I am waiting for Pinheiro and Bates' book to arrive via inter-library loan, but it will be a week or

Re: [R] Breakdown of Vector

2008-11-21 Thread Jagat.K.Sheth
No need to use a for loop. Try something like this dim(EXAM1) - c(20,7420/20) test.breakdown.list - as.list(data.frame(EXAM1)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rajasekaramya Sent: Friday, November 21, 2008 9:48 AM To:

Re: [R] Breakdown of Vector

2008-11-21 Thread Giovanni Petris
Also something along the following lines: x - 1:100 y - split(x, (seq(along = x) - 1) %/% 5) HTH, Giovanni Petris Date: Fri, 21 Nov 2008 07:48:09 -0800 (PST) From: Rajasekaramya [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list Hi, I have a vector of Size 7420. I wanna

Re: [R] Breakdown of Vector

2008-11-21 Thread jim holtman
another way: exam.list - split(EXAM, floor((seq_along(EXAM) - 1) / 20)) On Fri, Nov 21, 2008 at 10:48 AM, Rajasekaramya [EMAIL PROTECTED] wrote: Hi, I have a vector of Size 7420. I wanna break down in such a way that every 20 elements of it should be as elements of an list. Ex EXAM1

[R] lsoda warning too much accuracy requested

2008-11-21 Thread Colleen Carlson
Dear list - Does anyone have any ideas / comments about why I am receiving the following warning when I run lsoda: 1: lsoda-- at t (=r1), too much accuracy requested in: lsoda(start, times, model, parms) 2: for precision of machine.. see tolsf (=r2) in: lsoda(start, times,

[R] plots of ACF

2008-11-21 Thread Sara Mouro
Hello. I have one Model (M3) fitted using the lme package, and I have checked the correlation structure of within-group errors using plot(ACF (M3,maxLag=10),alpha=0.05) But now I am not sure how to interpret this plot for the empirical autocorrelation function. The problem is that I am

[R] HELP

2008-11-21 Thread Van den Berge Joke
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] lsoda warning too much accuracy requested

2008-11-21 Thread Thomas Petzoldt
Hi Colleen, this error was not uncommon and is usually a sign of a numerically problematic or wrongly implemented model. Please use package deSolve, the successor of odesolve, that is more robust and has also a bunch alternative solvers for difficult cases. I tested your code with deSolve

Re: [R] Simulation Result display form

2008-11-21 Thread jim holtman
Use something like sprintf if you want trailing zeros. x [1] 0.78 sprintf(%.4f, x) [1] 0.7800 On Fri, Nov 21, 2008 at 5:31 AM, Abelian [EMAIL PROTECTED] wrote: after obtaining the result, the result is displayed below: individual RS_number Phy_Posi LOH_intensity 1 1718890

Re: [R] Extracting diagonal matrix

2008-11-21 Thread A Ezhil
Hi, Thank you very much for the help. c[lower.tri(c,diag=FALSE)] works fine for me. Thanks again. Kind regards, Ezhil --- On Fri, 11/21/08, Anup Menon [EMAIL PROTECTED] wrote: From: Anup Menon [EMAIL PROTECTED] Subject: Re: [R] Extracting diagonal matrix To: [EMAIL PROTECTED] Cc:

Re: [R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
On Fri, Nov 21, 2008 at 6:12 PM, Douglas Bates [EMAIL PROTECTED] wrote: R uses column-major ordering of multidimensional arrays, as in Fortran, unlike the row-major ordering of C multidimensional arrays. This is because the numerical linear algebra code used in R is from the Eispack, Linpack,

Re: [R] capturing stderr/stdout

2008-11-21 Thread Sundar Dorai-Raj
Hi, Prof. Ripley, Thanks for the reply. Mostly I want to capture output as it is written to the stream. For example, I quite often do the following to view the progress of a log file from a computationally intensive script. 1. Open a console and type: Rscript script.R script.log which

[R] Basic question on concatenating factors

2008-11-21 Thread udi cohen
Hi all, I hope it's not too trivial for the list - I'm trying to concatenate two factor arrays, and obtain the following: f1-factor(c(a,a,b)) f1 [1] a a b Levels: a b f2-factor(c(b,b,a)) f2 [1] b b a Levels: a b c(f1,f2) [1] 1 1 2 2 2 1 Instead of getting: [1] a a b b b a Levels: a b a

[R] Discrepancy in the regression coefficients for Cox regression - PBC data set

2008-11-21 Thread Ravi Varadhan
Hi, When I run the following Cox proportional hazards model on the Mayo clinic's PBC data set (given in the survival package), the regression coefficients do not agree with the results presented in Table 4.6.3 (p. 195) of Fleming Harrington's book. library(survival) data(pbc) ans.cox -

Re: [R] plots of ACF

2008-11-21 Thread David Winsemius
There are a variety of reasons that a question might go unanswered for over a day on R-help. The question may be so technical or narrow that only one or two people may be equipped to answer it. Or it may look like homework. Or it may lack sufficient detail one which to base an answer. Or

Re: [R] Basic question on concatenating factors

2008-11-21 Thread Alain Guillet
Hi, I have a solution to concatenate two factors in one but I don't believe it is the best one: factor(c(as.character(f1),as.character(f2))) [1] a a b b b a Levels: a b You can always add a level by assigning a new vector at the level vector: levels(f1) - c(a,b,c) f1 [1] a a b Levels: a b c

Re: [R] Discrepancy in the regression coefficients for Cox regression - PBC data set

2008-11-21 Thread David Winsemius
There is a discussion in Appendix D.3 of Modeling Survival Data by Thereau and Grambsch regarding the differences in the datasets including the fact that there was significantly more follow-up for many patients at the time this dataset was assembled. I do not see a material difference in

Re: [R] capturing stderr/stdout

2008-11-21 Thread Prof Brian Ripley
Sundar Dorai-Raj wrote: Hi, Prof. Ripley, Thanks for the reply. Mostly I want to capture output as it is written to the stream. For example, I quite often do the following to view the progress of a log file from a computationally intensive script. 1. Open a console and type: Rscript

Re: [R] Discrepancy in the regression coefficients for Cox regression - PBC data set

2008-11-21 Thread Ravi Varadhan
Hi David, I did look at Appendix D.3 of TG, but am not sure if the data set analyzed in FH and that attached with survival are different. They both have n=418 (312 from RCT and 106 observational). There is a major difference in the coefficient for edema 0.66 vs 0.86. In any case, the point

[R] question about shapiro.test()

2008-11-21 Thread Eugene A. Semenko
Hi all! I tried to perform Shapiro-Wilk test for my sample of 243 values. Us [1] -10.4 -13.1 -12.2 38.1 -18.8 -13.3 -11.7 29.3 49.7 6.8 12.7 16.3 [13] 5.8 -0.7 -29.4 4.1 38.8 -1.4 8.8 15.6 32.9 -5.3 19.1 35.8 [25] 4.0 -1.5 0.6 -4.2 -10.0 -4.0 1.1 48.9 -21.0

[R] Equivalent to apply(x[,2:5],1,sum) for dataframe

2008-11-21 Thread Agustin Lobo
What's the most correct way of doing the equivalent to apply(x[,2:5],1,sum) if x is dataframe in which the only numeric fields are in columns 2:5 ? (using apply returns a character vector) Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris

[R] Problem with data.frame()

2008-11-21 Thread Agustin Lobo
Given str(x) 'data.frame': 5284 obs. of 5 variables: $ COD : chr 0800101001 0800101002 0800101003 0800101004 ... $ 0-4 : num 79 215 84 58 127 134 15 122 101 99 ... $ 5-9 : num 76 180 32 56 81 106 10 112 128 96 ... $ 10-14: num 68 145 39 46 78 81 8 92 142 107 ... $ 15-19: num 73

[R] list creation interpolation

2008-11-21 Thread H. Paul Benton
Hello all, I apologize if this is simple or has already been answered somewhere, but I'm not sure what to search for although I have tried and didn't come up with anything so.. Here's my question. How can I interpolate list names or do I have to do it post list creation. Since that's not

Re: [R] Ryan's Q Post-Hoc for ANOVA

2008-11-21 Thread Jarrett Byrnes
I realize this is a little late, but I recently ended up rolling my own Ryan's Q in R. If anyone is interested, or wishes to make improvements, you can find it here: http://homes.msi.ucsb.edu/~byrnes/r_files/ryans_q.r On Oct 25, 2005, at 10:15 AM, Jarrett Byrnes wrote: I'm using lm to

Re: [R] Fitting a sine wave using solver

2008-11-21 Thread Dieter Menne
Ben Zuckerberg bz73 at cornell.edu writes: I have several sets of oscillation data and would like to estimate the parameters of a sine function to each set (and hopefully automate this). There is an example using lme (yes, LINEAR) fit on page 239 of Pinheiro/Bates Mixed Effects Book

Re: [R] Problem with data.frame()

2008-11-21 Thread Dieter Menne
Agustin Lobo-4 wrote: Given str(x) 'data.frame': 5284 obs. of 5 variables: $ COD : chr 0800101001 0800101002 0800101003 0800101004 ... $ 0-4 : num 79 215 84 58 127 134 15 122 101 99 ... $ 5-9 : num 76 180 32 56 81 106 10 112 128 96 ... $ 10-14: num 68 145 39 46 78 81

Re: [R] Equivalent to apply(x[,2:5],1,sum) for dataframe

2008-11-21 Thread Dieter Menne
Agustin Lobo-4 wrote: What's the most correct way of doing the equivalent to apply(x[,2:5],1,sum) if x is dataframe in which the only numeric fields are in columns 2:5 ? (using apply returns a character vector) Could it be that you meant apply(x[,2:5],2,sum)? Not very easy to

Re: [R] Help with avoiding For Loop

2008-11-21 Thread Anup Menon
Dear Jorge, Thanks a lot. Regards Anup On Thu, Nov 20, 2008 at 10:19 PM, Jorge Ivan Velez [EMAIL PROTECTED] wrote: Dear Anup, Try this: # Data A - c(1,2,3,4,5) B - rnorm(100) # Results t(apply(sapply(A,function(x) pnorm(x*B)),2,function(x) c(Mean=mean(x),Var=var(x HTH,

Re: [R] Vector lty argrument for lines or plot

2008-11-21 Thread Brian Diggs
Thank you for the suggestion, baptiste. segments() does do exactly what I was wanting and matplot()/matlines() is probably a better solution to what I was trying to do. However, I am still concerned about the discrepancy between the documentation in ?par and the behavior of lines(). Should

[R] Conditionally Removing data from a vector

2008-11-21 Thread PDXRugger
I am having trouble removing entries from a vector based on the value of the vector and another object value. It works in my pseudo test run: DEV=400 #Y CANDS=c(100:105) #Z DEVS=c(120,220,320,420,520) if(DEVDEVS) (CANDS=CANDS[which(DEVDEVS)]) CANDS DEVS [1,]

[R] Saving color2D.matplot plots to a file

2008-11-21 Thread Garcia Carreras, Bernardo
Hi, I am trying to figure out how to save plots produced with color2D.matplot to a file, any format. I have tried: jpeg() / png() color2D.matplot(x,c(1,0),c(1,0),c(1,0)) dev.off() as well as dev.new() dev.print(device=png,file=myfreakinplot2.png) #(and jpeg, ps, pdf, eps, together with

[R] Suppression anova message

2008-11-21 Thread Blanchette, Marco
Dear all, I am running anova(lm()) on a series of different data frame and I am getting the following message Using dataFrame$levels as id variables 1. Why am I getting that message 2. How do I suppress it (or correct it). Thanks Marco -- Marco Blanchette, Ph.D. Assistant Investigator

[R] Suppression anova message

2008-11-21 Thread Blanchette, Marco
Dear all, I am running anova(lm()) on a series of different data frame and I am getting the following message Using dataFrame$levels as id variables 1. Why am I getting that message 2. How do I suppress it (or correct it). Thanks Marco -- Marco Blanchette, Ph.D. Assistant Investigator

[R] log likelihood

2008-11-21 Thread Joseph Magagnoli
Hi all, I ran a Weibull model, and I am wondering if there is any way to extract the log likelihood. I tried loglik(model) but it does not seem to work any help would be greatly appreciated joe [[alternative HTML version deleted]] __

[R] log likelihood

2008-11-21 Thread Joseph Magagnoli
Hi all, I ran a Weibull model, and I am wondering if there is any way to extract the log likelihood. I tried loglik(model) but it does not seem to work any help would be greatly appreciated joe [[alternative HTML version deleted]] __

Re: [R] Discrepancy in the regression coefficients for Cox regression - PBC data set

2008-11-21 Thread Peter Dalgaard
Ravi Varadhan wrote: Hi David, I did look at Appendix D.3 of TG, but am not sure if the data set analyzed in FH and that attached with survival are different. They both have n=418 (312 from RCT and 106 observational). Well, as David implies, if the observation times are longer and a few

Re: [R] Vector lty argrument for lines or plot

2008-11-21 Thread Peter Dalgaard
Brian Diggs wrote: Thank you for the suggestion, baptiste. segments() does do exactly what I was wanting and matplot()/matlines() is probably a better solution to what I was trying to do. However, I am still concerned about the discrepancy between the documentation in ?par and the behavior of

[R] Dendrogram labels

2008-11-21 Thread Richardson, Patrick
Is there any way to change the orientation of the labels on the end of the dendrograms to horizontal rather than vertical? If so, how can I do that. _ Patrick Richardson Biostatistician - Program of Translational Medicine Van Andel Research Institute

[R] Dendrogram labels

2008-11-21 Thread Richardson, Patrick
Is there any way to change the orientation of the labels on the end of the dendrograms to horizontal rather than vertical? If so, how can I do that. Below is my code, but I'm not sure which argument(s) I can use to change the label(s) (if it is possible to do). a - hclust(z, method =

Re: [R] Conditionally Removing data from a vector

2008-11-21 Thread Philipp Pagel
I am having trouble removing entries from a vector based on the value of the vector and another object value. It works in my pseudo test run: DEV=400 #Y CANDS=c(100:105) #Z DEVS=c(120,220,320,420,520) if(DEVDEVS) (CANDS=CANDS[which(DEVDEVS)]) CANDS

[R] rgl lighting question

2008-11-21 Thread Rajarshi Guha
Hi, I'm using rgl to generate a 3D surface plot and I'm struggling to get the lighting correct. Currently the surface gets plotted, but is very 'shiny'. On rotating the view, I get to see parts of the surface - but overall I don't see much detail because of the spotlight like lighting.

Re: [R] Discrepancy in the regression coefficients for Cox regression - PBC data set

2008-11-21 Thread Ravi Varadhan
Peter, I did check the data in the Appendix of FH with the data in survival package. I couldn't find any differences in the time and status variables. May be Terry Therneau knows the answer?! Ravi. --- Ravi

Re: [R] Dendrogram labels

2008-11-21 Thread Richardson, Patrick
This does work, but also orients the entire dendrogram as horizontal. If I could, I'd like the dendrogram to stay vertical and just orient the labels as horizontal. Many thanks, _ Patrick Richardson Biostatistician - Program of Translational

Re: [R] question about shapiro.test()

2008-11-21 Thread Greg Snow
Why are you doing the test for normality? The 2 most common reasons are: 1. want to test if data comes from an exact normal distribution. 2. want to know if tests based on normal assumptions are reasonable to use with this data. Technically, the Shapiro-Wilk test does not do either of the

Re: [R] list creation interpolation

2008-11-21 Thread Greg Snow
The $ syntax for working with elements of a list is a magical shortcut for [[]]. It is a great shortcut when used as intended, but trying to force magical shortcuts to do things that they were not intended for usually results in the programming equivalent of turning yourself into a toad. The

[R] Bug in Kendall for n4?

2008-11-21 Thread Stavros Macrakis
library(Kendall) Kendall(1:3,1:3) WARNING: Error exit, tauk2. IFAULT = 12 tau = 1, 2-sided pvalue =1 I believe Kendall tau is well-defined for this case and the reported value is correct; isn't it a bug to give a warning? (And if, e.g., the pvalue is not well-defined in this case,

Re: [R] Dendrogram labels

2008-11-21 Thread Fan Yang
hah, I see what you mean. try: plot(a, leaflab=c(textlike)). fan On Nov 21, 2008, at 2:30 PM, Richardson, Patrick wrote: This does work, but also orients the entire dendrogram as horizontal. If I could, I'd like the dendrogram to stay vertical and just orient the labels as horizontal.

Re: [R] rgl lighting question

2008-11-21 Thread Barry Rowlingson
2008/11/21 Rajarshi Guha [EMAIL PROTECTED]: Hi, I'm using rgl to generate a 3D surface plot and I'm struggling to get the lighting correct. Currently the surface gets plotted, but is very 'shiny'. On rotating the view, I get to see parts of the surface - but overall I don't see much detail

[R] list of list objects

2008-11-21 Thread Rajasekaramya
hi there, I have a list of list objects i need to remove the top layer [[1]] [1].0 ABC DEFLMN [1].1 WER ERT TRY [[2]] [2].0 ASD,werqwe [2].1 wdvghjggj I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there just a simple list is wat i need. [1].0 ABC DEFLMN [1].1 WER ERT TRY [2].0

[R] equation of a line or curve

2008-11-21 Thread CE.KA
Hi R users I used the function line(x,y) and line(lowess(x,y)) to see the correlation between 2 variables (x,y). Here is my question: is there a way to ask R to tell me the equation of -this line : line(x,y) -this curve: line(lowess(x,y)) Best regards -- View this message in context:

Re: [R] list of list objects

2008-11-21 Thread jim holtman
Will one of these two solutions work for you: x - list(list(1,2), list(3,4), list(5,6)) x [[1]] [[1]][[1]] [1] 1 [[1]][[2]] [1] 2 [[2]] [[2]][[1]] [1] 3 [[2]][[2]] [1] 4 [[3]] [[3]][[1]] [1] 5 [[3]][[2]] [1] 6 lapply(x, [[, 1) [[1]] [1] 1 [[2]] [1] 3 [[3]] [1] 5 lapply(x, '[', 1)

Re: [R] list of list objects

2008-11-21 Thread Jagat.K.Sheth
?unlist -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rajasekaramya Sent: Friday, November 21, 2008 2:14 PM To: r-help@r-project.org Subject: [R] list of list objects hi there, I have a list of list objects i need to remove the top layer [[1]]

Re: [R] list of list objects

2008-11-21 Thread Jagat.K.Sheth
?unlist -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rajasekaramya Sent: Friday, November 21, 2008 2:14 PM To: r-help@r-project.org Subject: [R] list of list objects hi there, I have a list of list objects i need to remove the top layer [[1]]

Re: [R] How to convert S4 class slots into data.frame or how to assign variables of type 'Date'

2008-11-21 Thread Ronny Wölbing
Hi, I created a class (S4) with some slots like value, date, description (it's actually a financial transaction class). Now I need a method to convert this class forth and back into a single row data.frame, where every slots represents a column. This method looks at the moment like

[R] Growth rate determination using ANCOVA

2008-11-21 Thread dschruth
I'm a programmer in a biology lab who is starting to use R to automate some of our statistical analysis of growth rate determination. But I'm running into some problems as I re-code. 1) Hypotheses concerning Slope similarity/difference: I'm using R's anova(lm()) methods to analyse a model

Re: [R] Conditionally Removing data from a vector

2008-11-21 Thread PDXRugger
I greatly apoligize, clear in my own mind, just didnt explain well enough. DEVS should equal 6 values the last being 620, like the data frame: CANDS DEVS [1,] 100 120 [2,] 101 220 [3,] 102 320 [4,] 103 420 [5,] 104 520 [6,] 105 620 And yes, my first question

[R] How can I access the list argument within a for function call

2008-11-21 Thread Mike Rowe
Greetings, I have been playing around with the R/Parallel package, which can farm out the computation of a for-loop among multiple worker processes. Each worker gets a chunk of the for-loop iterations; for example, if you have two workers and for(x in 1:1000){...}, one worker would typically

[R] Generalized Outer

2008-11-21 Thread Stavros Macrakis
Outer's arguments are restricted to atomic vectors or arrays built on atomic vectors (though the documentation is not explicit on this point). What is the equivalent for lists or arrays built on lists? My particular application was testing the Kendall tau function. I tried this outer(

Re: [R] How to convert S4 class slots into data.frame or how to assign variables of type 'Date'

2008-11-21 Thread Mark Lyman
Hi, I created a class (S4) with some slots like value, date, description (it's actually a financial transaction class). Now I need a method to convert this class forth and back into a single row data.frame, where every slots represents a column. This method looks at the

[R] OT statistics question on TukeyHSD

2008-11-21 Thread Dylan Beaudette
Hi, I have a dataset that is stratified by 3 levels, with an unequal number of observations per strata: AB C 182 18291 The data are approximately normally distrubuted. Is there any reason why I can NOT use TukeyHSD to do pair-wise comparison of means?

[R] Help with CCLUS

2008-11-21 Thread Erik Porfeli
Hi, I am using the following syntax to enter data and perform a cluster analysis: x - read.table (clstrdbt.csv, header=TRUE, sep = ,,fill = TRUE) cl-cclust(x,4,20,verbose=TRUE,method=kmeans) This is the result I receive: Error in cclust(x, 4, 20, verbose = TRUE, method = kmeans) : (list)

Re: [R] Conditionally Removing data from a vector

2008-11-21 Thread Philipp Pagel
DEVS should equal 6 values the last being 620, like the data frame: CANDS DEVS [1,] 100 120 [2,] 101 220 [3,] 102 320 [4,] 103 420 [5,] 104 520 [6,] 105 620 And yes, my first question is do i need a if statement at all as the which command seems to

Re: [R] HELP

2008-11-21 Thread Erik Iverson
Cannot reproduce. Van den Berge Joke wrote: __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] [R-pkgs] Update of X2R (with FishGraph) at CRAN, 20 Nov 2008

2008-11-21 Thread Michael H. Prager
X2R is a bundle of three software libraries for passing complicated data structures from Fortran, C/C++, or AD Model Builder to R. An update has been sent to CRAN and should be available from mirrors shortly. From the menu at the left of the CRAN home page, look under Software / Other. We

Re: [R] Dendrogram labels

2008-11-21 Thread Rodrigo Aluizio
Take a look at the las() function o ?par. It permits you to choice labels directions. __ Rodrigo Aluizio Em 21/11/2008, às 17:14, Richardson, Patrick [EMAIL PROTECTED] g escreveu: !#x000a Is there any way to change the orientation of the labels on the end of the dendrograms to

[R] Overlay two plots on the same device with axes having the same scale.

2008-11-21 Thread John Sorkin
R 2.6.0 Windows XP I have crated a file containing data with x and y values and have plotted the data using the output of gam. I would like to overlay an x,y plot of the data on top of the line returned by gam. I have succeeded in doing this using par(new=TRUE), unfortunately the y axis of

  1   2   >