A data analyst is working with a data frame named customers. It has separate columns for area code (area_code) and phone number (phone_num). The analyst wants to combine the two columns into a single column called phone_number, with the area code and phone number separated by a hyphen. What code chunk lets the analyst create the phone_number column?.

Respuesta :

Lanuel

The code chunk that lets the analyst create the phone_number column is: unite(customers, "phone_number", area_code, phone_num, sep="-"

What is a data frame?

A data frame refers to a two-dimensional array-like structure or table that is made up of rows and columns, which is typically used for storing data in R Studio using the R programming language.

In Computer programming, a data frame is a list of vectors that are all equal in length, and each column consist of values of one variable while each row consist of a set of values from each column.

The executable code in R Studio.

In this scenario, the code chunk that would be used to create a data frame that combines the two columns into a single column (phone_number) is:

  • unite(customers, "phone_number", area_code, phone_num, sep="-"

Read more on data frame here: https://brainly.com/question/25558534