[R-sig-eco] SPEI index

Manuel Esteban Lucas Borja ManuelEsteban.Lucas at uclm.es
Tue Dec 23 09:12:46 CET 2014


Dear All, 

I am starting to use R software in order to calculate an aridity index (SPEI). I have installed the spei package and the library. Then, I have created a .xls file with year, month, Precip and Temp variables. The xls file has been exported to txt format (separated by tabulations). Then to try, the only output I have obtained can be see below. Could anyone of you please help me? If you want, I can send you the txt file.

All the best, 

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 NA NA NA NA NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA NA NA NA NA

Script:
library(SPEI)
SPEI <- read.table("/Users/PALAN.txt", header=TRUE, sep="")
str(SPEI)
PET <- thornthwaite(SPEI$Tm,40.00000) 
spei(SPEI$PREC-PET,1)

---
Manuel Esteban Lucas Borja
Universidad de Castilla La Mancha
Escuela Técnica Superior de Ingenieros Agrónomos y de Montes 
Departamento de Ciencia y Tecnología Agroforestal y Genética
Campus Universitario s/n,
C.P. 02071, Albacete (Spain)
Télf.; 967599200 ext. 2818
Mail: ManuelEsteban.Lucas at uclm.es
Web:http://www.uclm.es/profesorado/manuelestebanlucas/


	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list