1. Learn
  2. /
  3. Courses
  4. /
  5. R, Yelp and the Search for Good Indian Food

Exercise

Exploring the data

The second chapter of this tutorial will be an alternative method of manipulating the Yelp star reviews. You will be working with the same sample of reviews of Indian restaurants but adapting the star reviews in a different way.

This method looks to adapt the star reviews with the perception that Yelp reviewers with Indian heritage would provide more accurate and authentic reviews for Indian cuisine. The strategy for manipulating the star reviews involves selecting only the reviewers with Indian names for the aggregate restaurant star review.

This means that you need a way to select just the users with native Indian names and that is where this chapter begins!

You will first load in a list of native Indians names that can be used to sort users. A list of native Indian names is located on our server in a text file indian_names.txt. The object indian_names_url contains a link to the data. Use the indian_names_url and the scan function to create a list indian_names that contains the native names you will use to sort the users.

Instructions

100 XP
  • Use scan() to load in the indian_names.txt file
  • Display the first 10 names with head()