"In sqrt(VS) : NaNs produced"

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

"In sqrt(VS) : NaNs produced"

Atul Saini
Hello R,
             I am attaching the script and data please help me to solve the
problem of

"In sqrt(VS) : NaNs produced"  with the p value of dumy$Mar

Regards,
______________________________________________
[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: "In sqrt(VS) : NaNs produced"

Michael Dewey-3
Your script and data were stripped so we are none the wiser I am afraid.
You need to embed the script in your post and give a minimal data-set
which exhibits the problem using dput() and embed that in the post too.

Michael

On 19/01/2020 08:25, Atul Saini wrote:

> Hello R,
>               I am attaching the script and data please help me to solve the
> problem of
>
> "In sqrt(VS) : NaNs produced"  with the p value of dumy$Mar
>
> Regards,
> ______________________________________________
> [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.
>

--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
[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: "In sqrt(VS) : NaNs produced"

John Kane-3
As a follow-up to Michael's post, here is a link to some advice on how
create the example.
/<a href=" http://adv-r.had.co.nz/Reproducibility.html "> How to write a
reproducible example </a>


On Mon, 20 Jan 2020 at 08:49, Michael Dewey <[hidden email]> wrote:

> Your script and data were stripped so we are none the wiser I am afraid.
> You need to embed the script in your post and give a minimal data-set
> which exhibits the problem using dput() and embed that in the post too.
>
> Michael
>
> On 19/01/2020 08:25, Atul Saini wrote:
> > Hello R,
> >               I am attaching the script and data please help me to solve
> the
> > problem of
> >
> > "In sqrt(VS) : NaNs produced"  with the p value of dumy$Mar
> >
> > Regards,
> > ______________________________________________
> > [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.
> >
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>
> ______________________________________________
> [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.
>


--
John Kane
Kingston ON Canada

        [[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: "In sqrt(VS) : NaNs produced"

Richard O'Keefe-2
In reply to this post by Atul Saini
> sqrt(c(1,-2,3))
[1] 1.000000      NaN 1.732051
Warning message:
In sqrt(c(1, -2, 3)) : NaNs produced
You might want to put
if (any(VS < 0)) stop("some VS are negative")
just after the definition of VS.

On Tue, 21 Jan 2020 at 02:01, Atul Saini <[hidden email]> wrote:

>
> Hello R,
>              I am attaching the script and data please help me to solve the
> problem of
>
> "In sqrt(VS) : NaNs produced"  with the p value of dumy$Mar
>
> Regards,
> ______________________________________________
> [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.