Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make sure your R code for part C passes all test provided by: ## check whether function ptypelerr is defined if ( test _ that

Make sure your R code for part C passes all test provided by:
## check whether function ptypelerr is defined
if(test_that(desc="", code={
expect_equal(exists("ptypellerr", mode="function"), TRUE)
})!= TRUE) stop("Function ptypellerr not created!")
## check whether output is numeric (or double)
if (test_that(desc="", code
expect_equal (is.numeric(ptypellerr (p=0.15,k=2)), TRUE)
})!= TRUE) stop("the output is not numeric/double.")
And
## check whether the 3 rd,4 th and 5 th digit of ptypellerr (p=0.23,k=5) are 0,4,5, respectively
if (test_that(desc="", code={
expect_equal ( floor * ptypeller. (p=0.23,k=5))%%1000==45, TRUE)
})!= TRUE) stop("Sorry, wrong answer")
## check whether the 4 th and 5 th digit of ptypellerr (p=0.28,k=4) are 3,9, respectively
if (test_that(desc="", code={
expect_equal ( floor ptypellerr {:(p=0.28,k=4))%%100,39
})!= TRUE) stop("Sorry, wrong answer")
## check whether ptypellerr (p=0.15,k=2)==0
if (test_that(desc="", code
expect_equal ( ptypellerr (p=0.15,k=2)==0, TRUE)
})!= TRUE) stop("Sorry, wrong answer")
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions