To suppress this warning you can use the following command. #`summarise()` regrouping output by xxx (override with `.groups` argument) #`summarise()` ungrouping output (override with `.groups` argument) Since dplyr >= 1.0.0 version you may get the following warnings. Group by multiple columns in dplyr, using string vector input. Summarise_at(vars(Y2011:Y2015), funs(n(), mean(., na.rm = TRUE))) Index Y2011_n Y2012_n Y2013_n Y2014_n Y2015_n Y2011_mean Y2012_mean Using dplyr summarize and groupby functions based on 'or' condition among multiple columns of a dataframe. We are calculating count and mean of variables Y2011 and Y2012 by variable Index. The snapshot of first 6 rows of the dataset is shown below. This dataset contains 51 observations (rows) and 16 variables (columns). To download the dataset, click on this link - Dataset and then right click and hit Save as option. Note : This data do not contain actual income figures of the states. In this tutorial, we are using the following data which contains income generated by states from year 2002 to 2015.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |