[R] mcmc simulation

2011-04-18 Thread Peter Francis
Dear List, I am reading a method and am unsure how to do something similar, so have come here for advice! I have a observed value and a expected value generated from a null model. I am looking to see if observed - expected is significantly different from zero. So in the method in the paper

Re: [R] Mean from confidence intervals

2011-01-29 Thread Peter Francis
if there is a function to do it for you, I am not sure, but it would be trivial to programme and if you show us the formula for it (the mean from the CI), we can certainly give you pointers for how to write your own :) Cheers, Josh On Fri, Jan 28, 2011 at 2:15 PM, Peter Francis peterfran...@me.com wrote

[R] Plot 1:1 relationship

2011-01-28 Thread Peter Francis
Dear list, I am looking to plot a line on a graph to show the 1:1 relationship, in order to demonstrate the pattern i have observed is off the line, however i am unsure. I have tried abline but i can not see a function to plot the 1:1? Any help would be greatly appreciated #generate data y -

[R] Mean from confidence intervals

2011-01-28 Thread Peter Francis
Dear List, I am not sure if A) this is possible or B) the correct place to ask. I am looking to find the mean - i have n, and the two-tailed confidence intervals 0.95 0.25 with a p-value of 0.05. Can i find the mean from this data ? Thanks Peter

[R] Sum by column

2011-01-12 Thread Peter Francis
Dear List, I have a question of convenience, I am looking to sum the values of one column based on another column - a example may help explain better! ED ECOCODE 21.809467 AA0101 36.229566 PA1201 51.861284 PA1201 11.36232PA1201 27.264634

Re: [R] Sum by column

2011-01-12 Thread Peter Francis
would use ave. If you wanted a new structure (somewhat shorter) you would use tapply with sum as the function. E. g: tapply(ecoregion$ED, ecoregion$ECOCODE, sum) -- David. On Jan 12, 2011, at 5:38 AM, Peter Francis wrote: Dear List, I have a question of convenience, I am looking to sum

[R] Dispersion ( Plot error bars ) help

2010-10-26 Thread Peter Francis
Dear List, I am looking to plot error bars on a line using dispersion. I have values for the upper value and for the lower values, however i am unsure how to plot different values for the upper CI and the lower CI? I have been using dispersion(1:35,sim,simCI,col=red) Where there are 35

[R] Plot help

2010-10-20 Thread Peter Francis
Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not noticed - if this is the case i apologise.

[R] Plot help

2010-10-20 Thread Peter Francis
Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not noticed - if this is the case i apologise.

[R] Gini Coefficient

2010-10-19 Thread Peter Francis
Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that! I am trying to calculate Gini coefficients in R, based on a slight modification of the typical equation that i have seen in a paper.

[R] Randomly shuffle an array 1000 times

2010-10-18 Thread Peter Francis
Dear List, I have a table i have read into R: NameYes/No John0 Frank 1 Ann 0 James 1 Alex1 etc - 800 different times. What i want to do is shuffle yes/no and randomly re-assign them to the name. I have used sample() and permute(), however there is no way to do