spi package

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

spi package

Okan Mert Katipoglu
 
  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.
Bu e-posta mesaji ve ekleri sadece gonderildigi kisi veya kuruma ozeldir. Mesajin alicisi siz degilseniz, bu mesajin yonlendirilmesi, kopyalanmasi veya herhangi bir sekilde kullanilmasi yasaktir.Mesaj iceriginde bulunan fikir ve yorumlar, sadece gondericiye aittir. Bu mesaj bilinen tum viruslere karsi taranmistir.

This e-mail and any files transmitted with it are confid...{{dropped:2}}

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: spi package

Sarah Goslee
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
<[hidden email]> 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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: spi package

Sarah Goslee
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
<[hidden email]> 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" <[hidden email]>
> Kime: "okan katipoglu" <[hidden email]>
> Kk: "r-help" <[hidden email]>
> 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
> <[hidden email]> 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

______________________________________________
[hidden email] 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.