1.

The _________ function is used to generate summary statistics from the data frame within strata defined by a variable.(a) groupby()(b) group()(c) group_by()(d) arrangeThis question was posed to me in a national level competition.The origin of the question is dplyr topic in portion R – Data Storage, Formats, Objects and Operations of R Programming

Answer»

The correct option is (c) group_by()

Easiest explanation: The general operation here is a combination of splitting a data frame into separate pieces defined by a variable or GROUP of variables (group_by()), and then applying a SUMMARY function ACROSS those SUBSETS (summarize()).



Discussion

No Comment Found

Related InterviewSolutions