Re: [R] density plot of simulated exponential distributed data

2011-04-28 Thread Juanjuan Chai
I tried logspline function using a lower bound 0 for my data, it works like a charm. When the I changed the xlim only positive part, the vertical line was also gone. That's exactly what I expected. Thanks. -JJ Greg Snow wrote: You might want to use the logspline package instead of the

[R] density plot of simulated exponential distributed data

2011-04-26 Thread Juanjuan Chai
Hi all, I tried to plot the density curve using the data from simulation. I am sure that the data should be exponentially distributed, but the plot of density curve always starts from (0,0) which is not the case for exponential distribution. Is there any way around this, to keep the

[R] sort a data frame according to all the Columns

2010-01-27 Thread Juanjuan Chai
Hi, I have a data frame read from a .csv file, with columns V1,V2,V3...,V18, per say, and I want to sort this data frame according to V1, and then V2, then V3..., and so on. Is there any fast way to get around with this problem? Thanks. -JJ __