[R] using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval

2010-10-15 Thread David LeBauer
to make this a general function. Thanks, David -- David LeBauer, PhD Energy Biosciences Institute University of Illinois Urbana-Champaign 1206 W. Gregory Drive Urbana, IL  61801, U.S.A. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] can I add line breaks to the paste() function?

2010-10-01 Thread David LeBauer
("1st line\n2nd line\n") > > Jeremy > > > > > On 30 September 2010 13:30, David LeBauer wrote: >> Can I add a line break to the paste() function to return the following: >> >> 'this is the first line' >> '

[R] can I add line breaks to the paste() function?

2010-09-30 Thread David LeBauer
Can I add a line break to the paste() function to return the following: 'this is the first line' 'this is the second line' instead of 'this is the first line this is the second line' ? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] is there a function to find the quantile of the mean of a vector?

2010-06-18 Thread David LeBauer
56 >  [8] 0.191087609 0.096348590 3.837329960 >> which.min((x-mean(x))^2) > [1] 3 >> x[which.min((x-mean(x))^2)] > [1] 5.291413 >> which.min(scale(x, scale = FALSE)**2) > [1] 3 > See ?which.min and ?scale for more information. > HTH, > Jorge > > On Thu

[R] is there a function to find the quantile of the mean of a vector?

2010-06-17 Thread David LeBauer
Hello, I am interested in finding the quantile of the mean of a vector, something analogous to using the pnorm(), but for an mcmc chain instead of a distribution with known parameters. One approach would be to write a function that finds the index of x_i that minimizes (x-mean(x))^2 I suspect th