Sample String Question
Sample question only. The task is similar to what will be evaluated during the exam.
Task
Imagine you have a string that represents an individual’s email address.
email <- ‘[email protected]’
Complete the function email_domain so that it returns the email address domain (everything after the @ symbol). In the example above, it should return ‘gmail.com’.
Function Start
email_domain <- function( email ) {
# TO DO
}
Function Output
The email domain of the email address
gmail.com
Ready to get prove your data skills?
Not ready for the test?
Check out some of our favorite free and cheap resources we’ve compiled to help you prepare for our exam to land you a job as a Data Scientist or Analyst.