Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let x be a character vector and suppose you want to change all appearances to magenta in vector x by purple. Create a new vector

Let x be a character vector and suppose you want to change all appearances to magenta in vector x by purple. Create a new vector y (within the function replacemagenta()) which is just like x except that magenta is replaced by purple. For example, if
x = c("blue", "magenta", "yellow", "green", "cyan", "magenta", "black", "red")
then y should read
y
[1] "blue" "purple" "yellow" "green" "cyan" "purple" "black" "red"

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

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago