Fw: modified mankendal

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fw: modified mankendal

R help mailing list-2

 Hello DearI used modifiedmk package for trend analyses.this is my script
 require(modifiedmk)X1<-read.table("c:/elham/first article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this error:
Error in if (S == 0) { : missing value where TRUE/FALSE needed
would you please help me to solve itSincerely yoursElham


 
        [[alternative HTML version deleted]]

______________________________________________
[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: Fw: modified mankendal

R help mailing list-2
 Would you resubmit your question in plain text mode? 
This is a plain text list and the HTML gets stripped away. What is left is this
Hello DearI used modifiedmk package for trend analyses.this is my script
 require(modifiedmk)X1<-read.table("c:/elham/first article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this error:
Error in if (S == 0) { : missing value where TRUE/FALSE needed
would you please help me to solve itSincerely yoursElham
It is very close to unreadable. You should read the posting guide at the bottom of each email.
You might also find these links useful:
How to make a great R reproducible example? aka MCVE (Minimal, Complete, and Verifiable Example)


|
|
|
|  |  |

 |

 |
|
|  |
How to make a great R reproducible example? aka MCVE (Minimal, Complete,...

When discussing performance with colleagues, teaching, sending a bug report or searching for guidance on mailing...
 |

 |

 |




    On Wednesday, November 22, 2017, 3:24:05 PM EST, Elham Fakharizade via R-help <[hidden email]> wrote:  
 
 
 Hello DearI used modifiedmk package for trend analyses.this is my script
 require(modifiedmk)X1<-read.table("c:/elham/first article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this error:
Error in if (S == 0) { : missing value where TRUE/FALSE needed
would you please help me to solve itSincerely yoursElham


 
    [[alternative HTML version deleted]]

______________________________________________
[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.  
        [[alternative HTML version deleted]]

______________________________________________
[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: Fw: modified mankendal

Jim Lemon-4
In reply to this post by R help mailing list-2
Hi Elham,
The error message is pretty explicit. Check your dataset for missing values.

Jim

On Thu, Nov 23, 2017 at 6:14 AM, Elham Fakharizade via R-help
<[hidden email]> wrote:

>
>  Hello DearI used modifiedmk package for trend analyses.this is my script
>  require(modifiedmk)X1<-read.table("c:/elham/first article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
> outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this error:
> Error in if (S == 0) { : missing value where TRUE/FALSE needed
> would you please help me to solve itSincerely yoursElham
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [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.

______________________________________________
[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: Fw: modified mankendal

Jim Lemon-4
Hi Elham,
The error message:

Error in if (S == 0) { : missing value where TRUE/FALSE needed

means that for at least one S, the value is missing. The best advice I
can give you is to load the data frame X1 as in your code above, and
try something like:

which.na<-function(x) return(which(is.na(x)))
sapply(X1,which.na)

You will then get a list of the positions of any NA values in X1.

Jim

On Fri, Nov 24, 2017 at 7:45 PM, Elham Fakharizade <[hidden email]> wrote:

> Hello Dear Jim
> Thanks for your answering
> I have more than 65000 data in my file I search for NA or NAN but nothing
> find. how can I search for missing value?
> Sincerely yours
> Elham
>
> Elham Fakharizadeshirazi.
>
> Doctoral guest researcher in Institute of Meteorology,
>
> Department of Earth Sciences,
>
> Free university of Berlin,
>
> Berlin, Germany.
>
>
>
> On Friday, November 24, 2017, 4:33:12 AM GMT+1, Jim Lemon
> <[hidden email]> wrote:
>
>
> Hi Elham,
> The error message is pretty explicit. Check your dataset for missing values.
>
> Jim
>
> On Thu, Nov 23, 2017 at 6:14 AM, Elham Fakharizade via R-help
> <[hidden email]> wrote:
>>
>>  Hello DearI used modifiedmk package for trend analyses.this is my script
>>  require(modifiedmk)X1<-read.table("c:/elham/first
>> article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1)
>> outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in
>> 1:d[2]){MK<-tfpwmk(X1[,c])outMK[1,c]<-getElement(MK,"S")outMK[2,c]<-getElement(MK,"Var(S)")outMK[3,c]<-getElement(MK,"Sen's
>> Slope")outMK[4,c]<-getElement(MK,"P-value")} unfortunetally I got this
>> error:
>> Error in if (S == 0) { : missing value where TRUE/FALSE needed
>> would you please help me to solve itSincerely yoursElham
>
>>
>>
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [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.
>

______________________________________________
[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.