The authors of the spi package are clearly coming from some other programming language, and did some un-Rish things.
Where you are assuming that nargs, the first argument, is the number of months, in fact it is literally the number of arguments you're passing to the function, not counting itself, and so must be in the range 3-7. So you actually need: spi(3,"tercanspi.txt",1966,2017) spi(7,"tercanspi.txt",1966,2017,"Tercan Standart Yağış İndeksi",2,"Yıllar","Aylar") spi(7,"tercanspi.txt",1966,2017,"Tercan Standart Yağış İndeksi",2,"Yıllar","Aylar") spi(7,"tercanspi.txt",1966,2017,"Tercan Standart Yağış İndeksi",2,"Yıllar","Aylar") No matter what the help implies, you apparently can't choose your own timescale. I think you might have more success with the SPEI package, on CRAN, which includes both SPEI and SPI. Sarah On Mon, Nov 5, 2018 at 1:43 AM Okan Mert Katipoglu <okan.katipo...@atauni.edu.tr> wrote: > > > When I used ''spi(1,"tercanspi.txt",1966,2017)'' > > "Error: very small number of arguments > > > When I used > spi(9,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > İndeksi",2,"Yıllar","Aylar") > spi(12,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > İndeksi",2,"Yıllar","Aylar") > spi(24,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > İndeksi",2,"Yıllar","Aylar") > > Error: very large number of arguments > > > ----- Orijinal Mesaj ----- > Kimden: "Sarah Goslee" <sarah.gos...@gmail.com> > Kime: "okan katipoglu" <okan.katipo...@atauni.edu.tr> > Kk: "r-help" <r-help@r-project.org> > Gönderilenler: 3 Kasım Cumartesi 2018 17:20:33 > Konu: Re: [R] spi package > > It would help a lot if you actually told us what your error was. > > Based on ?spi::spi your command looks correct, so we need more information. > > Sarah > On Sat, Nov 3, 2018 at 10:02 AM Okan Mert Katipoglu > <okan.katipo...@atauni.edu.tr> wrote: > > > > > > Hi,Can I get information about following spi error, > > > > spi(1,"tercanspi.txt",1966,2017) > > > > spi(9,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > > İndeksi",2,"Yıllar","Aylar") > > > > spi(12,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > > İndeksi",2,"Yıllar","Aylar") > > > > spi(24,"tercanspi.txt",1966,2017,"Tercan Standart Yağış > > İndeksi",2,"Yıllar","Aylar") > > > > how do I run these commands. > > > > Thanks so much. > -- Sarah Goslee (she/her) http://www.numberwright.com ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.