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/