[R] remove last char of a text string

2010-06-14 Thread glaporta
Dear R experts, is there a simple way to remove the last char of a text string? substr() function use as parameter start end only... but my strings are of different length... 01asap05a - 01asap05 02ee04b - 02ee04 Thank you all, Gianandrea -- View this message in context:

[R] From xtabs to matrix

2009-07-02 Thread glaporta
Hi list, is it possible convert the xtabs result xtabs(breaks~tension+wool,data=warpbreaks) wool tension A B L 401 254 M 216 259 H 221 169 to a simple matrix? A B L 401 254 M 216 259 H 221 169 Thanks a lot! Gianandrea -- View this

[R] Self Organizing Map

2009-03-30 Thread glaporta
Dear list, I really appreciate previous suggestion about self organizing map. I tried to perform SOM analyses with kohonen, som and class packages, but it's not clear to me if these packages are complete to: 1) cluster neurons according to their similarities (U-matrix); 2) assign to SOM neurons

[R] Self-Organizing Map analysis

2009-03-03 Thread glaporta
Dear list, I read the SOM package manual but I don't understand how to perform (for example) 1) the SOM analysis on Iris data 2) with a visualization similar to that of figure 7 in http://www.cis.hut.fi/projects/somtoolbox/package/papers/techrep.pdf Any suggestion? Thanks in advance, Gianandrea

Re: [R] dotplot points color

2009-02-20 Thread glaporta
Thank you Deepayan, for this suggestion dotplot(variety ~ yield | site, data = barley, groups = year, pch=21, fill = c(1, 2)) glaporta wrote: Dear list, is it possible to change the background color of dotplot's points? I tried in many ways but unsuccessfully Thanks in advance

[R] dotplot points color

2009-02-19 Thread glaporta
Dear list, is it possible to change the background color of dotplot's points? I tried in many ways but unsuccessfully Thanks in advance Gianandrea require(lattice) dotplot(variety ~ yield | site, data = barley, groups = year, pch=21) dotplot(variety ~ yield | site, data = barley, groups =

Re: [R] multisample median test

2008-11-12 Thread glaporta
PS. I tried with: tree-data.frame(n,e,s,w) kruskal.test(tree) but result is not the same of the book... glaporta wrote: Hi, does anyone know a rapid way to perform the multisample median test as the example 10.12 of Biostatistical Analysis of j. Zar (pag. 201) on median elm tree height

[R] multisample median test

2008-11-12 Thread glaporta
Hi, does anyone know a rapid way to perform the multisample median test as the example 10.12 of Biostatistical Analysis of j. Zar (pag. 201) on median elm tree height? The heights were: n-c(7.1,7.2,7.4,7.6,7.6,7.7,7.7,7.9,8.1,8.4,8.5,8.8) e-c(6.9,7,7.1,7.2,7.3,7.3,7.4,7.6,7.8,8.1,8.3,8.5)

[R] dotplot with a log scale

2008-10-31 Thread glaporta
Dear all, I would like to create a dotplot (lattice) with a log scale as the function http://www.nabble.com/dotchart-with-log-scale--td5411625.html#a5411625 mydotchart of Johannes Huesing. Is it possible? Thanx Gianandrea -- View this message in context:

Re: [R] dotplot with a log scale

2008-10-31 Thread glaporta
Perfectly... thanx Deepayan Deepayan Sarkar wrote: On 10/31/08, glaporta [EMAIL PROTECTED] wrote: Dear all, I would like to create a dotplot (lattice) with a log scale as the function http://www.nabble.com/dotchart-with-log-scale--td5411625.html#a5411625 mydotchart of Johannes

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread glaporta
Dear Michael, take a look at plotmeans in gplots library. library(gplots) example(plotmeans) Hope this helps, Gianandrea Michael Just wrote: Hello, I'd appreciate a suggestion on how to construct plots (barplots?) that use means on the Y axis instead of density/count. I'd also like to

[R] cca constraining variables table

2008-09-26 Thread glaporta
I performed canonical correspondence analysis (cca) with the example data of vegan, but I'm not able to obtain a table like scores() for the constraining variables. I can see them in the summary() mode, but it would be great to have in a separate table. Any suggestion?, thanx Gianandrea

[R] plot error

2008-09-23 Thread glaporta
HI there, why these lines of code are correct plot(count~spray, data = InsectSprays) plot(InsectSprays$count) but this return an error: plot(count, data = InsectSprays); data method is not implemented in plot?! Thanx, Gianandrea -- View this message in context:

Re: [R] drop unused levels in sqldf

2008-08-29 Thread glaporta
Thanx guys, practical and effective solutions. Gianandrea glaporta wrote: Hi, sqldf is a fantastic package, but when the SELECT procedure runs unused levels remain in the output. I tried with the drop function, but without success. Do you have any suggestions? Thanx, Gianandrea data

[R] drop unused levels in sqldf

2008-08-28 Thread glaporta
Hi, sqldf is a fantastic package, but when the SELECT procedure runs unused levels remain in the output. I tried with the drop function, but without success. Do you have any suggestions? Thanx, Gianandrea data(iris) require(sqldf) base-sqldf(select * from iris where Species 'setosa') str(base)

Re: [R] mean-plot (add residuals)

2008-08-10 Thread glaporta
Try with plotmeans in gplots Regards, Gianandrea Jörg Groß wrote: Hi, I want to plot the mean of a variable and add the standard deviation as a line going above and below the mean (like the whiskers in a boxplot) but I don't know how to add these residual-lines. Is there an easy

Re: [R] multiple tapply

2008-08-08 Thread glaporta
R: great software and wonderful community! Thanx guys, Gianandrea -- View this message in context: http://www.nabble.com/multiple-tapply-tp18868063p18886279.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] independent contributes to the discriminant function

2008-08-08 Thread glaporta
I performed Discriminant Function Analysis with lda(MASS), candisc(candisc), discrimin(ade4), NaiveBayes(klaR), but I'm not able to find how to test independent contributes to the discriminant function. In STATISTICA there is the Partial Wilks' Lambda, in SPSS (variable) Wilks' Lambda, but in R