[R-sig-Geo] Help with ENFA in R
JonathanAronson
jagaronson at gmail.com
Thu Apr 11 17:30:00 CEST 2013
Hi Mathieu
Thank you greatly, I have been using your advice and it seems to be working.
I used readAsciiGrid to import my 15 variables and then cbind to create the
new data frame. The result is below:
> join <- cbind(x at data, y at data, a at data, b at data, c at data, d at data, e at data,
> f at data, g at data, h at data, i at data, j at data, k at data, l at data, m at data)
> head(na.omit(join))
bio_01.asc bio_12.asc Aridity.asc altitude.asc unpalatable.asc
thicket.asc
385 9626 5698 6272 7.007191 5.282318
3.979096
386 9611 5432 5951 7.903753 5.279835
3.980666
387 9631 5109 5601 5.723457 5.277520
3.982328
388 9623 4859 5474 6.031349 5.275373
3.984080
389 9634 4694 5210 3.238761 5.273394
3.985923
641 9617 5939 6507 7.019991 5.352698
3.956286
succulent.asc shrubland.asc rainforest.asc mosaic.asc mopane.asc
misavanna.asc
385 105.5797 1.1239479 9.631459 4.517803 18.87709
3.094614
386 105.5253 1.1543059 9.638020 4.519337 18.87111
3.095095
387 105.4725 1.1239479 9.644965 4.521014 18.86544
3.095683
388 105.4215 1.1007079 9.652295 4.522834 18.86010
3.096377
389 105.3720 1.0860595 9.660006 4.524796 18.85507
3.097176
641 106.6615 0.6861283 9.535002 4.500543 19.01172
3.083889
hydro.asc fynbos.asc desert.asc
385 6.274230 107.9704 1.218094
386 6.290221 107.9120 1.152849
387 6.306502 107.8552 1.095933
388 6.323067 107.8001 1.051082
389 6.339908 107.7465 1.022137
641 5.968595 109.1287 1.152849
I then loaded my locality data and converted to SpatialPoints as follows:
locs<- read.csv("Species_Localities/R.blasii.csv", header=T)
library(sp)
xy.sp = SpatialPoints(locs)
summary(xy.sp)
class(xy.sp)
I think now the next step in the ENFA but Im getting a little stuck. Im not
sure what "slot" is in the lynxjura example. Id like to prepare the data for
enfa and run the PCA. could you please provide some help with this?
Thank you so so much
Jonathan
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Help-with-ENFA-in-R-tp7583243p7583282.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list