[R-sig-eco] SPEI index calculation

Manuel Esteban Lucas Borja M@nue|E@teb@n@Luc@@ @end|ng |rom uc|m@e@
Mon Jan 27 17:41:20 CET 2020


Dear all, 

I am trying to calculate SPEI index using Rstudio (please see data used below this email). First I calculated PET (latitude 40,29), and then I failed when asking for SPEI index: 

 spei(SPEI$PREC-PET,1). 

The only result I got is NA. 

Any idea about what´s wrong? 

Thanks for helping and for your time, 

Manuel 

Year	Month 	TMED	PREC	
2010	1	0.9	59.8	
2010	2	1.43	66.7	
2010	3	3.3	35	
2010	4	7.9	23.5	
2010	5	9.58	22.9	
2010	6	14.3	23.1	
2010	7	20.6	0.5	
2010	8	18.95	7.6	
2010	9	13.94	25.6	
2010	10	8.29	60	
2010	11	3.14	71.2	
2010	12	2.05	95.8	
2011	1	1.5	35	
2011	2	2.8	66	
2011	3	4.8	59.8	
2011	4	10.1	68.6	
2011	5	12.7	24	
2011	6	16.7	18.2	
2011	7	18.2	12	
2011	8	19.9	10.6	
2011	9	15.8	1.7	
2011	10	10.9	8.6	
2011	11	5.9	78.6	
2011	12	2.7	18.5	
2012	1	1.86	10.3	
2012	2	-0.89	4.2	
2012	3	4.9	4.5	
2012	4	5.4	119.8	
2012	5	12.8	7.7	
2012	6	17.6	21.7	
2012	7	19.6	1.8	
2012	8	20.8	1.6	
2012	9	14.7	49.5	
2012	10	9.64	61	
2012	11	5.55	95.5	
2012	12	1	46	
				
				
				
				
				
				
				
				
				
				
				


More information about the R-sig-ecology mailing list