Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use R as coding language q#9 and 10 asap D The following information is used in questions 8-11. The count_nas () function inputs a vector

image text in transcribed

use R as coding language q#9 and 10 asap

image text in transcribed
D The following information is used in questions 8-11. The count_nas () function inputs a vector x and outputs the number of NAs (including NaN, if applicable) in x. count_nas count_nas (character (0) ) [1] 0 > count_nas (c (1, NA, 3, NA, NaN, 8) ) [1] 3 > count nas (NA) [1] 1 > count_nas (1:10) [1] 0 D Question 9 3 pts Keeping the if and for statement structure, fix the count_nas () function so that it works as intended. Edit View Insert Format Tools Table 12pt Paragraph BIUA LV TRY . .. Question 10 3 pts Use vectorization to rewrite the count_nas () function without a loop. Edit View Insert Format Tools Table 12pt Paragraph B I U A LV T V Q V BV BY DV

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

Challenging Math Problems

Authors: Terry Stickels

1st Edition

0486808572, 9780486808574

More Books

Students also viewed these Mathematics questions

Question

=+a) Compute the EV for each alternative decision.

Answered: 1 week ago