Question: Using functions from the package ` dplyr ` , split the values in the column ` Sub Category ` into the columns ` Category `
Using functions from the package dplyr split the values in the column Sub Category into the columns Category and Sub Category according to the following rules:
Split the values based on the first occurrence of
When does not occur do not split the value. In this case simply use the original value as the Category and set the Sub Category as NA
When there is more than one occurrence of do not perform any additional splits.
Store your answer as the object q
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
