Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Is there are function R that condenses down multiple row observations?

$
0
0

I have this data frame:

image_of_dataframe

I am wanting to condense the rows by 'Survey_group' so that instead of there being three rows of NA's per financial metric, the percentages are in a single row.E.g: Female 0.09% 0.04% etc

I have tried group_by() and summarise() but these two functions don't make sense to use here and have also looked in melt/cast but those I think are more for converting from wide to long whereas I want to keep this dataframe in wide format.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>