How to get a total sum based on a certain columns containing the same value
A dataframe has columns code1
, code2
, code3
etc., with codes stored in them. For each code, there is a column with number of days used days_used1
, days_used2
, days_used3
etc. I want to get a dataframe including a column for each code which has the days_used summed for each of the values in code
.
How to get a total sum based on a certain columns containing the same value R
A dataframe has columns code1
, code2
, code3
etc., with codes stored in them. For each code, there is a column with number of days used days_used1
, days_used2
, days_used3
etc. I want to get a dataframe including a column for each code which has the days_used summed for each of the values in code
.