Skip to content
Prev 392391 / 398502 Next

Need help

A few issues
1) What does this function do? If you describe the problem and goal there might be a better answer. We appreciate seeing that you have attempted a solution, but you have trapped us all in blindly following your attempt. 

2) This is an error checking phase of programming. Setting the seed is a good idea. Just remember to unset the seed after finishing the debugging phase.

3) In uniroot you call the function, but the function expects an argument (zz) that is not provided, and there is no default.

4) I set.seed(42), and entered ff(12) getting an answer of -0.1468287. Is this the expected result?

Regards,
Tim

-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Md. Moyazzem Hossain
Sent: Thursday, August 4, 2022 9:50 AM
To: J C Nash <profjcnash at gmail.com>
Cc: r-help mailing list <r-help at r-project.org>
Subject: Re: [R] Need help

[External Email]

Dear JN,

Thanks.

I do not check whether the function actually crosses zero or not. However, by assumption, the value would be greater than zero.

Hossain
On Thu, Aug 4, 2022 at 2:40 PM J C Nash <profjcnash at gmail.com> wrote:

            
--
Best Regards,
Md. Moyazzem Hossain
Associate Professor
Department of Statistics
Jahangirnagar University
Savar, Dhaka-1342, Bangladesh
Website: https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.juniv.edu%2Fteachers%2Fhossainmm&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=z%2Bq179lF8MAawyc7KPXgNgGfwC9Sf0dnu34XRJxnpGY%3D&amp;reserved=0
Research: *[image: Google Scholar]
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscholar.google.com%2Fcitations%3Fhl%3Den%26user%3D-U03XCgAAAAJ&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=N6t1WrH0iRPVvd4L%2FmwqJLNXzFaK1ViPo6v1PrD8gDk%3D&amp;reserved=0>* | *ResearchGate
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.researchgate.net%2Fprofile%2FMd_Hossain107&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=qxDL1f3bKTdxyMYH8cQaxOwCmgclU1PUSB8iS1FdPRQ%3D&amp;reserved=0>* | *ORCID iD
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Forcid.org%2F0000-0003-3593-6936&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=XEb%2BO2pnwNwDDOt0bDgRcIS6MzBd3q%2Bz8xnByUl6Y8w%3D&amp;reserved=0>*


______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=g8ytuAGlQp5gAkXSiOkMzs0aurSim4hjX7MGg4dnjd4%3D&amp;reserved=0
PLEASE do read the posting guide https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&amp;data=05%7C01%7Ctebert%40ufl.edu%7C5f71ee421f734ed8758b08da762083f7%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637952179362158744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=GhE0lfrdqQ8fe4YXl3PwxtTAG2SPgG6BYzv5eUXe2UQ%3D&amp;reserved=0
and provide commented, minimal, self-contained, reproducible code.
Message-ID: <BN6PR2201MB1553335262E763DEB4E74B87CF9F9@BN6PR2201MB1553.namprd22.prod.outlook.com>
In-Reply-To: <CAO29qn6kLevZfJt1BrNN4KmcUR2sbFZdz5hZfFsQ-6041f9WCg@mail.gmail.com>