[R] fitting particular distributions

2012-07-29 Thread Jonathan Hughes
Hi there, I got a question that is both about stats and R. Imagine two alternative stochastic processes: a. Each subject has an exponential distribution of lifetime, with a parameter lambda; If I simulate 100 such subjects and rank their lifetimes, they'd look like this: >plot(sort(rex

[R] help with filled.contour() -

2012-07-03 Thread Jonathan Hughes
Dear all, I can't figure out a way to have more than one plot using filled.contour() in a single plate. I tried to use layout() or par(), but the way filled.contour() is written seems to override those commands. Any suggestions would be really appreciated. Jonathan

[R] quick question about binary data

2011-02-15 Thread Jonathan Hughes
Dear all,This is both an R and a statistics question. I want to test whether males and females of a given species tend to co-occur in a given sampling unit more frequently than expected by chance. I'm thinking about using a binomial distribution with p as the sex ratio of the entire population.

Re: [R] filtering a dataframe with a vector of rownames

2011-01-14 Thread Jonathan Hughes
Department of Statistics >UC Berkeley > spec...@stat.berkeley.edu > > > > On Fri, 14 Jan 2011, Jonathan Hughes wrote: > > > > > > > Hello, > > > > Here's my problem. I hav

[R] filtering a dataframe with a vector of rownames

2011-01-14 Thread Jonathan Hughes
Hello, Here's my problem. I have a large data frame and a vector with some of its row names. I'd like to have a new data frame only with those rows that match this vector of row names. I tried this: data<-cbind(c(1,2,3,4,5,6),c(2,3,4,5,6,7)) rownames(data)<-c("a", "b", "c","d","e","f") names