Re: [R-sig-eco] Quantifying widths of polygons

2015-09-30 Thread Baldwin, Jim -FS
One metric for an "average width" that would be quick to calculate might be the diameter of a circle that has the same area as the polygon. (Of course, if the tree crowns are nowhere near circular, this won't likely be a useful metric.) Maybe there might be a similar approach for finding an

Re: [R-sig-eco] Regression with few observations per factor level

2014-10-20 Thread Baldwin, Jim -FS
Yes, the analysis with a small sample size would be valid (under the assumption that the model - both fixed and random effects are correctly specified) but at some point there must be a practical assessment as to the desired precision and the costs of the consequences of either inadequate

Re: [R-sig-eco] report out by t.test

2014-03-23 Thread Baldwin, Jim -FS
The sentence alternative hypothesis: true difference in means is not equal to 0 is stating what the alternative hypothesis is and not that your particular difference in means is significantly different from zero. That sentence would appear (when you have a two-tailed test) no matter what the

Re: [R-sig-eco] joint distribution

2014-01-17 Thread Baldwin, Jim -FS
An explicit formula for a posterior distribution is not something to expect from an MCMC procedure. But the next best thing to an explicit formula for a posterior distribution is a zillion samples from that distribution (which is what you have). What you can do is display smooth

Re: [R-sig-eco] solving differential equations for ecological models

2013-12-25 Thread Baldwin, Jim -FS
Using Mathematica I get the following: H1 - (apred1*ashark2*eshark2*(ashark3*b2+ashark2*xpred)+ ashark3*eshark3*(-(alpha22*b2*(ashark3*b1+ashark1*xpred))+ alpha12*b1*(ashark3*b2+ashark2*xpred))-alpha22*apred1*ashark3*b2*xshark+ apred2^2*ashark1*epred2*xshark-apred2*(-(ashark3*

Re: [R-sig-eco] generating equation (linear or non-linear) from scatter plot data

2013-09-27 Thread Baldwin, Jim -FS
Do you have multiple measurements on individuals? If so, have you accounted for the repeated measures? If there are no multiple measurements on individuals, then maybe what explains a decrease in body size is a selection bias: only smaller individuals survive in later time periods resulting

Re: [R-sig-eco] point color in NMDS (vegan)

2013-08-18 Thread Baldwin, Jim -FS
I assume that the dataset island is yours so I've made that equivalent to an example dataset in vegan named dune. Below is a rather brute force way to assign colors. library(MASS) library(vegan) data(dune) island = dune island.NMDS - metaMDS(island,k=2, distfun = betadiver, distance =

Re: [R-sig-eco] Should one remove highly correlated variables before doing PCA??

2013-03-06 Thread Baldwin, Jim -FS
Two additional issues might be considered: 1. Correlated variables are still correlated after PCA or after tossing one of the variables so teasing apart separate effects of the two variables is not resolved (nor can it necessarily be resolved with the particular dataset at hand). 2. The

Re: [R-sig-eco] Issue with BiodiversityR::nested.npmanova

2013-02-23 Thread Baldwin, Jim -FS
I suspect it must be a version problem. Running Windows XP (yes, still XP) with R version 2.13.1 (2011-07-08) and just now loading vegan and BiodiversityR I get the following: library(BiodiversityR) Loading required package: vegan Loading required package: permute This is vegan 2.0-2 Warning

Re: [R-sig-eco] error in layernames and RasterStack

2012-12-06 Thread Baldwin, Jim -FS
I think you might want names(r) - c(x1, x2, x3) rather than r@layernames - c(x1, x2, x3) Jim -Original Message- From: r-sig-ecology-boun...@r-project.org [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Alok K. Bohara Sent: Thursday, December 06, 2012 10:26 AM

Re: [R-sig-eco] Export Google Maps Route to R and get kilometers coordinates

2012-09-19 Thread Baldwin, Jim -FS
Because that road has a few bends, you'll need to get more points (just lat and long not necessarily KM) on that road just as you've done at the plaques. That would give you a set of connected nodes (as suggested below by David Valentim Dias) that would better approximate the road. Those

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread Baldwin, Jim -FS
Here is an alternative approach that takes a few more steps and assumes the original data frame is named d0: # Split into two data frames d1 - d0[,c(1:3)] d2 - d0[,c(1,4,5)] # Rename the columns in the second one so that the names match names(d2) - names(d1) # Concatenate the two identically

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread Baldwin, Jim -FS
Sorry. It looked fine when I sent it. Below I've added back in the line feeds that somehow disappeared. Jim -Original Message- From: r-sig-ecology-boun...@r-project.org [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Baldwin, Jim -FS Sent: Friday, June 29, 2012 10:28 AM