Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Please assist me with my R Programming, using R or RStudio please help me with question number 7 parts a-d and post the code

Hello, Please assist me with my R Programming, using R or RStudio please help me with question number 7 parts a-d and post the code you used to run below!image text in transcribed

7. Define the following functions: a. A function funcSum that accepts a numeric vector and returns the sum of the elements. Assume input will not have missing values, special values, and at least one element. A function funcIsPrime that accepts a numeric scalar (vector of length one) and returns TRUE is the input is a prime number and FALSE otherwise. Assume input will not have missing values, special values, and at least one element. A function funcCountNA that accepts a vector and returns the number of missing values (NAs) found in the vector. A function funcCountDENA that accepts two arguments: x, a data frame; and an option parameter count mode (default-1). If count_mode equals 1, then the function should return the total number of missing values in the entire input data b. c. d. frame; if count_mode equals 2, then the function should return the number of rows in which there is at least one missing value in the input data frame; if count_mode equals 3, then the function should return the number of columns in which there is at least one missing value in the input data frame. If x is not a data frame or is count_mode is not in the set {1, 2, 3), the function should return a NULL Hint: See help on length; sum; is.na; is.data.frame

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions