How to mutate across multiple columns when dataframe is input parameter within function
I have many dataframes that all have the same variables and structure. I would like to go from individual level data in each input dataframe, and using functions, summarize the input dataframe across all rows creating new variables. I.e., for every input dataframe, I would like to create an output dataframe with one row summarizing the variables named in regularVar_names
for every specified age group, with age group being flexibly implemented. The function should estimate the number of rows where the variable is not-NA
How to mutate across multiple columns when dataframe is input parameter within function
I have many dataframes that all have the same variables and structure. I would like to go from individual level data in each input dataframe, and using functions, summarize the input dataframe across all rows creating new variables. I.e., for every input dataframe, I would like to create an output dataframe with one row summarizing the variables named in regularVar_names
for every specified age group, with age group being flexibly implemented. The function should estimate the number of rows where the variable is not-NA