Re: [R] learning lattice graphics

2007-05-30 Thread Tyler Smith
On 2007-05-27, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: I would also suggest Paul Murrell's book R Graphics. http://www.amazon.com/Graphics-Computer-Science-Data-Analysis/dp/158488486X/ --sundar Thanks all! I have the relevant chapters from the Murrell book now (which were available as

[R] manova permutations and pair-wise contrasts

2007-05-30 Thread Tyler Smith
Hi, I have a function for doing permutation tests for Manovas, written with the help of folks here on the list. It seems to work ok, and I've found that there is indeed a significant difference among groups in my analysis. I want to follow up on this by testing for which pairs of groups are

Re: [R] learning lattice graphics

2007-05-27 Thread Tyler Smith
On 2007-05-27, Adrian Dragulescu [EMAIL PROTECTED] wrote: Check the documentation link from http://cm.bell-labs.com/cm/ms/departments/sia/project/trellis/software.writing.html Thanks Adrian, that looks great! Tyler __ R-help@stat.math.ethz.ch

[R] learning lattice graphics

2007-05-26 Thread Tyler Smith
Hi, I've just produced my first lattice plot - the graphic is very impressive, but I only partly understand how it works. I crimped from examples in MASS and the help pages to get most of what I want done. Howver, I find both MASS and the help pages are a little too terse for my needs as a

Re: [R] windows to unix

2007-05-26 Thread Tyler Smith
On 2007-05-25, Barry Rowlingson [EMAIL PROTECTED] wrote: Erin Is there any way to take a Windows version of R, compiled from source, compress it, and put it on a Unix-like environment, please? You can take a Windows-compiled R to Unix, but you can't make it work The

Re: [R] testing difference (or similarities) between two distance matrices (not independent)

2007-05-26 Thread Tyler Smith
On 2007-05-25, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i'm looking to test if two distance matrices are statistically different from each others. both these matrices are obviously not independent from each others, so Mantel test and others correlation tests do not apply here. I

Re: [R] my ugly apply/sweep code needs help

2007-05-20 Thread Tyler Smith
On 2007-05-19, Gabor Grothendieck [EMAIL PROTECTED] wrote: sweep.median2 - function(data.mat, group.vec, group.sel) { sweep.med - function(x) sweep(x, 2, apply(x, 2, median)) f - function(g) cbind(g+0, sweep.med(data.mat[group.vec == g,,drop = FALSE ])) do.call(rbind,

[R] my ugly apply/sweep code needs help

2007-05-18 Thread Tyler Smith
Hi, I have a matrix of data from from several groups. I need to center the data by group, subtracting the group median from each value, initially for two groups at a time. I have a working function to do this, but it looks quite inelegant. There must be a more straightforward way to do this, but

Re: [R] Character coerced to factor and I cannot get it back

2007-04-19 Thread Tyler Smith
I really need to sit down with the manual and sort factors and classes properly. In your case, I think the problem has something to do with the way a list behaves? I'm not sure, but if you convert your list to a dataframe it seems to work ok: dd3 - as.data.frame(dd1) typeof(dd3$st) [1] integer

Re: [R] MANOVA permutation testing

2007-03-19 Thread Tyler Smith
result in turn be replacement. E.g.: Thanks! Your explanations will be quite helpful in cleaning up my code. -- Regards, Tyler Smith __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] how to...

2007-03-17 Thread Tyler Smith
row of the first table. The result for your example is: sapply(sample.df[,1:4], FUN=function(x)summary.aov(aov(x~sample.df$group))[[1]][1,Pr(F)]) sample1sample2sample3sample4 0.09961436 0.04405756 0.49289026 0.67389417 -- Regards, Tyler Smith

[R] MANOVA permutation testing

2007-03-15 Thread Tyler Smith
species -- but did I do this properly? -- Regards, Tyler Smith __ 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

[R] legend font

2007-02-14 Thread Tyler Smith
), legend = levels(factor(label.vector)), col = plotting.colours, pch =plotsym.bw, cex = 0.7 ) How can I do this? -- Regards, Tyler Smith __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] legend font

2007-02-14 Thread Tyler Smith
On Wed, Feb 14, 2007 at 02:40:47PM -0500, Duncan Murdoch wrote: On 2/14/2007 1:32 PM, Tyler Smith wrote: Hi, I'd like to make the text in my legends italic, ... How can I do this? This should work: plot(1,1) savefont - par(font=3) legend(topright, legend=c('Label 1', 'Label 2

Re: [R] PCA biplot question

2006-04-20 Thread Tyler Smith
I think you're asking how to plot arrows for variables in one dataset onto the PCA plot for another dataset? You can do this with functions from the vegan package. Particularly, vector and factor fitting can be done with envfit() and surface fitting with ordisurf(). There's a good tutorial at:

Re: [R] isoMDS and 0 distances

2006-04-19 Thread Tyler Smith
can do it. Sometimes the classical MDS solution is a local optimum of the isoMDS criterion. In these cases isoMDS converges in one step (rather it gives you the classical MDS solution). This may happen with and without zero or NA distances. Best, Christian On Tue, 18 Apr 2006, Tyler

[R] isoMDS and 0 distances

2006-04-18 Thread Tyler Smith
Hi, I'm trying to do a non-metric multidimensional scaling using isoMDS. However, I have some '0' distances in my data, and I'm not sure how to deal with them. I'd rather not drop rows from the original data, as I am comparing several datasets (morphology and molecular data) for the same

[R] Ubuntu and R

2006-02-16 Thread Tyler Smith
/ -- Tyler Smith __ 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

[R] Subsetting matrices

2006-02-07 Thread Tyler Smith
relating to subsetting and drop=true issues, but I'm afraid I just don't understand what I need to do. I've pasted the functions below - any help would be appreciated. Thanks! Tyler Smith matrix.slicer - function(mat, label.vector){ selector - 999 print(Select species to remove from

[R] Graphics 'snapshots' in Linux?

2005-09-15 Thread Tyler Smith
Hi, I'm working on a MEPIS (Debian-based Linux) computer, using the emacs/ESS package to do my R work. I've got some plots that I label interactively using the locate function. With the Windows GUI there is an option to take a snapshot of the graphics output, saving it as an image file. Is

[R] efficient filtering of matrices

2005-05-05 Thread Tyler Smith
Yikes, that looks complicated. I think what you're trying to do is available already, see: ?subset -- Tyler Smith PhD Candidate Plant Science Department Faculty of Agricultural and Environmental Sciences McGill University MacDonald Campus 21,111 Lakeshore Ste. Anne de Bellevue, Quebec, Canada

[R] How to add some of data in the first place dataset

2005-04-27 Thread Tyler Smith
Try this: x- matrix(1:12, nrow = 4, byrow = T) y - matrix (13:24, nrow=4, by.row=T) To add the rows of y before the rows of x: rbind(y,x) -- Tyler Smith __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Advice for calling a C function

2005-04-27 Thread Tyler Smith
. Hopefully, any further questions I have won't involve anything so silly as switching indexes. Cheers, Tyler Tyler Smith PhD Candidate Department of Plant Science McGill University 21,111 Lakeshore Road Ste. Anne de Bellevue, Quebec H9X 3V9 CANADA Tel: 514 398-7851 ext. 8726 Fax: 514 398-7897 [EMAIL

[R] Advice for calling a C function

2005-04-26 Thread Tyler Smith
to avoid rebuilding the matrix entirely, but it's a bit beyond me. I'm using WindowsXP, R 2.1.0 (2005-04-18), and the MinGW compiler. Thanks for your continued patience, Tyler -- Tyler Smith PhD Candidate Department of Plant Science McGill University 21,111 Lakeshore Road Ste. Anne de Bellevue, Quebec

[R] Installing packages, again

2005-04-25 Thread Tyler Smith
directory. Can anyone tell me what I've overlooked? I have also gone into Mkrules and updated all the paths that I could. Thanks again, Tyler -- Tyler Smith PhD Candidate Department of Plant Science McGill University [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

[R] Installing packages, again

2005-04-25 Thread Tyler Smith
Thanks! I tried adding the .Rbuildignore file, but that didn't work out. So I found the Makedeps file in the vegan/src folder and deleted it. That solved the problem. Tyler -- Tyler Smith PhD Candidate Department of Plant Science [EMAIL PROTECTED

[R] Installing packages from source on WindowsXP

2005-04-22 Thread Tyler Smith
was, it's gone now. Magic. Thanks!! On a related note, now that I seem to be on top of installing packages from source files, is there any advantage to installing the R software itself from source files? From the help files that sounds even trickier... Tyler -- Tyler Smith PhD Candidate

[R] Installing packages from source on WindowsXP

2005-04-21 Thread Tyler Smith
I want to read the original code to see how experienced users write functions. I'm using version 2.0.1 Patched (2005-04-16). Thanks for your time, Tyler -- Tyler Smith PhD Candidate Department of Plant Science McGill University [EMAIL PROTECTED] __ R

Re: [R] Very Slow Gower Similarity Function

2005-04-18 Thread Tyler Smith
Quoting Martin Maechler [EMAIL PROTECTED]: I don't know what exactly you want. The Gower coefficient I am referring to comes from his 1971 article in Biometrics (27(4):857-871). It differs from most commonly used measures (but not, apparently, daisy!) by allowing the incorporation of