Help on sorting phone nymber

I wanted to help on my Rstudio questions,
The phone numbers in the Starbucks data set are not standardized, even when we only consider the Starbucks stores in California. Phone numbers typically have ten digits. Standardize the phone number column for the California Starbucks' data set so the structure is the same for the whole column. Phone numbers should be in the following form: (123) 456-7890. If a location does not have a phone number posted put NA. Display the first 100 corrected phone numbers.
I was able to have the non-NA data listed on the dataset, and I don't know the next step is can someone pointed out?
This is the link you can download the dataset: Starbucks Locations Worldwide | Kaggle

Here is my code for now:

starbucks$Phone.Number[starbucks$Phone.Number== ""] <- NA
head(na.omit(starbucks$Phone.Number), 100)

Hi, welcome!

Please have a look to our homework policy, homework inspired questions are welcome but they should not include verbatim instructions from your course.

Phone numbers typically have ten digits.


Take a look at the dialr package.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.