[R] distance matrix

2008-01-20 Thread WCD
Hello, I want do get the point to point distance matrix. Suppose, I have a data frame where the first column is X and second column is Y coordinate of points. I define a function dst(x1,y1,x2,y2) to claculate distance between two points. But I don't know how to tell R to calculate dst for every tw

Re: [R] distance matrix

2008-01-20 Thread WCD
x.df) > > > The default is euclidean distance. > > Hope this helps! > > Sincerely, > Erin > > > On Jan 20, 2008 2:41 PM, WCD <[EMAIL PROTECTED]> wrote: >> >> Hello, I want do get the point to point distance matrix. >> Suppose, I have a

[R] interactive menu in scripts

2008-01-25 Thread WCD
Hello, I would like to make my R script more interactive. Well, I want the script to work like this: I run the script from R Console and it offers me some options (press 1 for something, or press 2 for something else). After pressing 1 or 2, do corresponding procedure. I am not able to find out

Re: [R] interactive menu in scripts

2008-01-26 Thread WCD
n make some choices or set some parameters via the R console. Filip Kral. Henrique Dallazuanna wrote: > > Try like this: > > switch(menu(c("Normal", "Poisson")), rnorm(5), rpois(5, 3)) > > > On 25/01/2008, WCD <[EMAIL PROTECTED]> wrote: >

[R] triangle.plot - change the axes orientation

2008-02-21 Thread WCD
Hello, I need to chenge axes orirentation in triangle plot. (function triangle.plot in ade4 package) I want to plot elasticities of some species in demographic triangle, where axes values commnly increace "clockwise". If some better imangination is needed, see http://www.open.ac.uk/science/biosci/