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.katipoglu at 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.goslee at gmail.com>
> Kime: "okan katipoglu" <okan.katipoglu at atauni.edu.tr>
> Kk: "r-help" <r-help at 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.katipoglu at 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