Question: 1. Write a function that will take a vector as input and return the vector with NAs changed to a null string ('') if the

 1. Write a function that will take a vector as input

and return the vector with NAs changed to a null string ('')

1. Write a function that will take a vector as input and return the vector with NAs changed to a null string ('') if the vector is a character vector or to o if it is a numeric vector. Test your function on extreme examples. 3. Extend the previous function so the value to which that NAs are changed can be supplied as a parameter with default value the same as in the previous question. Make the value to which NAs are changed potentially depend on the type of variable. Test your function on extreme examples. 1. Write a function that will take a vector as input and return the vector with NAs changed to a null string ('') if the vector is a character vector or to o if it is a numeric vector. Test your function on extreme examples. 3. Extend the previous function so the value to which that NAs are changed can be supplied as a parameter with default value the same as in the previous question. Make the value to which NAs are changed potentially depend on the type of variable. Test your function on extreme examples

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!