[R] xyplot: different scales accross rows, same scales within rows
Dear list members, I would like to set up a multiple panel in xyplots, with the same scale for all colunms in each row, but different accross rows. relation=free would set up all x or y scales free... which is not what I want :-( Is this possible? Thank you in advance, Best wishes, Marta __ R-help@stat.math.ethz.ch 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.
[R] warning in GAM
Hello, I have a problem when doing gam (from gam library; I am using R 2.4.0, windows xp platform) When doing: example(gam) There is this error message (which also happens when using my data) Warning: a final empty element has been omitted the part of the args list of 'list' being evaluated was: (coefficients = fit$beta, residuals = fit$y - fit$eta, fitted.values = fit$eta, effects = effects, weights = w, rank = qrank, assign = attr(x, assign), qr = qrx, smooth = fit$s, nl.df = fit$df - 1, ) Any ideias? Thank you very much in advance, Marta PS: happy new year :-) -- ... Marta M. Rufino (PhD) . Instituto Nacional de Investigação Agrária e das Pescas (INIAP/IPIMAR), Centro Regional de Investigação Pesqueira do Sul (CRIPSul) Avenida 5 de Outubro s/n P-8700-305 Olhão, Portugal +351 289 700 541 . Institut de Ciències del Mar - CMIMA (CSIC) Passeig Marítim de la Barceloneta, 37-49 08003 BARCELONA - Catalunya Spain __ R-help@stat.math.ethz.ch 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] Difference between two correlation matrices
Hello, I don't know if it is applicable in your case, but have you tried Mantel test? You can use it to determine significant correlation between two matrices, using Pearsion, Spearman or Kendal correlation indices. Hope it helps, All the best, Marta - Original Message - From: michael watson (IAH-C) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 2:49 PM Subject: [R] Difference between two correlation matrices Hi Now a more theoretical question. I have two correlation matrices - one of a set of variables under a particular condition, the other of the same set of variables under a different condition. Is there a statistical test I can use to see if these correlation matrices are different? Thanks Mick __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Fourier analysis
Dear colegues, Is there any function in R for calculating the four coefficients of each harmonic in fourier analysis, from a set of x,y coordinates is given? Is it possible to do Fourier analysis? Has anyone done contour analysis using R? Any help wil be apretiated, Thank you very much, All the best, Marta __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Questions of t.test {stats}
Dear colegue, I am not sure if it is this what you want, but to apply the t.test to all rows in a data frame, you can do like: apply(dataframe, 1, t.test) If you want to store the results in a nice data frame, to us after, then you should do a function, for example: wilcox CI plus median median.ci.wilcox=function(y){ # print(example: use to construct graphs with 95% CI, using xYplot, from Hmisc. use summarize to compute the CI in function of factors) if (is.R()) {require(ctest)} if(length(y)5){ c=t.test(y, conf.int=T, conf.level=.95) res=c(mean=c$estimate, Lower=c(c$conf.int[1]), Upper=c(c$conf.int[2]))} else {res=c(median=NA, Lower=NA, Upper=NA)} res } hope this helps, All the best, Marta - Original Message - From: pcscan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 4:04 AM Subject: [R] Questions of t.test {stats} We are currently using the t-test in Package stats, t.test(x, y = NULL, alternative = c(two.sided, less, greater), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95, ...) but have some troubles : 1. why does the t-test take so a long time to perform a single test on a row of a data.frame ? Is there any alternative function to perform t-test on all the rows of a data.frame ? 2. We got different results on the following data with the argument var.equal setting as TRUE and FALSE respectively. We are curious why the Welch Two Sample t-test couldn't distinguish these two vectors well. Any help is greatly appreciated. Sincerely. Liu Yu Ting === x - c(-0.299611385,-0.164028986,-0.225545128,-0.244473171,-0.276619985,-0.276362 81,-0.289633015,-0.298994167,-0.27908886,-0.265612916,-0.262321082,-0.295753 768,-0.235677803,-0.283872306,-0.282174954,-0.241592817,-0.274716893,-0.2886 55752,-0.262166777,-0.263298345,-0.252239841,-0.298274078,-0.28958158,-0.187 174691,-0.26628157,-0.252034102,-0.248793703,-0.267207398,-0.289838754,-0.28 4283785,-0.118097619,-0.27898599,-0.265818655,-0.295085114,-0.246839177,-0.2 76105636,-0.293336328,-0.294210721,-0.259543597,0.18181929,-0.276311375,-0.2 48948008,-0.212583533,-0.247147786,-0.269573403,-0.27636281,-0.295445158,-0. 281146256,-0.27636281,-0.255840285,-0.292513369,-0.21664689,-0.228014003,-0. 238249548,-0.238300983,-0.238506723,-0.242004296,-0.213869405,-0.272916672,- 0.293233458,-0.239483986,-0.147672687,-0.289941624,-0.233774712,-0.237940939 ,-0.276517115,-0.22431069,-0.217469848,0.461573717,-0.218858591,-0.280271863 ,-0.290867452,-0.177144886,-0.179150847,-0.258463465,-0.269470533,-0.2482279 19,-0.221327466,-0.217418413,-0.290044494,-0.290610278,-0.260006512,-0.22261 3338,-0.275951331,0.015118775,0.116959879,-0.24509039,-0.092894518,0.5274618 26) y - c(0.963784092,-0.266641614,4.623274441,1.6857758,-0.251159709,-0.090631382,1 .380355357,-0.117840445,7.213998979,3.404935937,1.444648983) t.test(x,y) Welch Two Sample t-test data: x and y t = -2.8369, df = 10.009, p-value = 0.01763 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -3.6338688 -0.4369566 sample estimates: mean of x mean of y -0.2180945 1.8173182 t.test(x,y,var.equal=TRUE) Two Sample t-test data: x and y t = -8.2473, df = 98, p-value = 7.507e-13 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -2.525175 -1.545650 sample estimates: mean of x mean of y -0.2180945 1.8173182 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] filling patterns in image and examples
Dear R-users, I would like to do a image plot with patterns filling the squares instead of colors. How can I do it? Is there manuals with examples of image.plot? I search but could not find many. Thank you All the best Marta [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] heatmap help
Hello, I was just doing heatmaps myself ;-) and I had the same problem. It would be nice to have such an example in the help file because it is not clear (thank you). you use (for example... this is my case, which I am doing the distance matrix using vegdist function with Bray curtis similarity): heatmap(matrix, scale=none, distfun=function(m) vegdist(m, method=bray), hclustfun=function(m) hclust(m, method=average), col= grey(seq(0.8,0,l=5))) or you can put directly the distance matrix that you may want, but I found it worst. To have the right labels on I found that the best way would be to have them in the matrix directely, because if we put it after it does not work well... I have been having difficulties in producing the scale that I want and doing the correct legend... I found an email with a function (image.scale()), but it does not work entirely well. How can I define the values I want in the scale, for example, use red for 1 g, blue for 2 g, etc... Is there a simpler way of doing the legend? thank you very much, Marta Dear R wizards, Hopeful someone can help me with what I believe is a pretty simple task. I pretty new to R so some (much) of the obvious escapes me. How do I get a distance matrix into heatmap? What do I tell distfun if what I'm trying to map is already an ordered distance matrix? I tried heatmap(x, distfun=as.dist(x)) where x is the distance matrix but R gave me an error. Thanks in advance for any help. Paul Lepp `-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. ,-;`-:-. `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=` ==/==/==/==/==/ ,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=, ,-'-' `-=_,-'-' `-=_,-'-' `-=_,-'-' `-=_,-'-' `-=_,-'-' Paul Lepp, Ph.D. Stanford School of Medicine VAPAHCS, 154T Dept. of Microbiology Immunology 3801 Miranda Ave Stanford University Palo Alto, CA 94304 Stanford, CA (650) 493-5000 x66762fax: (650) 852-3291 http://cmgm.stanford.edu/~pwlepp [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] plot.dendrogram
Dear R-users, I would like to change the labels size and format in the node ends of a dendrogram, how can I do it? How can I use different symbols/colors in each node ends ? I manage to do it with plot.cluster, but heat map uses plot.dendrogram. Can anyone help me please? thank you Marta [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to add error bar to the data in R?
Hello, Use the function xYplot from hmisc package cheers, Marta __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] SIMPER-similarity percentage
Hello, Does anyone know if the SIMPER analysis is implemented in R? It is a multivariate analysis that shows the contribution of a each variable in a group, and the variables responsible for the difference between groups. It is implemented in the statistical package PRIMER and is frequently used in biological studies (community level). Any help is strongly apretiated, thank you in advance, Marta [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Column names of a data frame
Hello, Can anyone tell me how to change the column names of an already existing data frame? I've read the docs for ?data.frame and ?as.data.frame but can't figure it out. names(object.name)=c(col.name1, col.name2, col.name3, etc.) # note that the number of names as to the the same as the number of columns in your data frame # Another alternative would be: labels(object.name)[[2]] I want to make a new data.frame from some of the columns of an existing data.frame, but when I do that, the new data.frame columns have the same names as the old data.frame's columns, and I want them to be different # For exaple, if you want to create a new data frame called new.dataframe, with columns 1 and 2 from the dataframe1, and # colnm 3 and 10 from dataframe2, you do like this: new.dataframe=data.frame(data.frame1[,1:2], data.frame1[,c(3,10)]) # If you want to call a different name to the col, for example: new.dataframe=data.frame(new name=data.frame1[,1], new name2 = data.frame2[,3]) # or, once you created you rename the names, as: names(object.name)=c(col.name1, col.name2, col.name3, etc.) the [row numbers, col numbers] is for subsetting the dataframes (or whatever objects). hope this helps, All the best Marta Rufino __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] plot.new?
Hello, Probably the only probem is that you have to do the plot first, than you put the line in. so, first: plot(x,y) # then you do the abline command. abline(coef..., col=2) Marta __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] MANOVA with random factor
Dear list members, I would like to know how do I define a MANOVA with a random factor (block) and two fixed factors (repeated measures designs)? What about if we want to see if a matrix is significantly different from zero? is there any nonparametric procedure available in R? thank you very much Marta __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] plot discrimnant analysis
Hello, Does anyone knows how to do the plots from discriminant analysis (lda and qda)? Is there any computed function to do the stepwise procedure? thank you in advance Marta __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Lattice graphs: lines, symbols and strips
Dear collegue, I have some questions about lattice graphs: 1. How can I introduce different lines in different graphs, from the same page? For example, in the upper row of graphs, I would like to have a line at 0.5, in the middle one at 0.3, and in the lower at 0.1. I am using panel.abline, but I can only make it appear in all the graphs, not in some of tham only... 2. Is it possible that the strips only appear in the top of the graphics, once per column? and once per row? This would be very nice, because it could save lots of graph space... 3. How can I make that the symbol within the graph varies with two variables, for example when it is good I want to put a open circle and when it is bad a closed circle or for example, that each point gets the number of samples..., but this changes throughtout the graphs... 4. I have two series of points, and would like tham to be separated, not overlaped. I tried jitter, but it did not worked (I am using xyplot). Could you please help me? Thank you very much in advance, Marta º`·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´¯`·.¸.·´¯`·...¸º `·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´ Marta Rufino Institut de Ciencies del Mar Centre Mediterrani d'Investigacions Marines i Ambientals (CSIC) Passeig Maritim 37-49 08003 Barcelona Catalunya, Spain Tfno:00 34 93 230 95 40 Tfax:00 34 93 230 95 55 º`·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´¯`·.¸.·´¯`·...¸º `·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´¯`·.¸.·´¯`·...¸º`·.¸¸.·´ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help