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

2010-10-15 Thread David LeBauer
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/listinfo/r-help

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

2010-10-01 Thread David LeBauer
line\n2nd line\n) Jeremy On 30 September 2010 13:30, David LeBauer dleba...@gmail.com wrote: 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] 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

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

2010-06-18 Thread David LeBauer
[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, Jun 17, 2010 at 7:06 PM, David LeBauer wrote: Hello, I am interested in finding the quantile of the mean of a vector, something analogous

[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