Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

In ggplot2, how can I seperately plot four group of one csv file in barchart?

$
0
0

I am a beginner in R. I have one question.

I am trying to make the multiple bar aenter image description here

For doing this, I am using the below data

gender party      likes_count
<chr>  <chr>               <dbl>
1 F      D              587.
2 F      R              180.
3 M      D              335.
4 M      R              177.


  gender party      comments_count
  <chr>  <chr>             <dbl>
1 F      D             155. 
2 F      R             18.2
3 M      D             71.7
4 M      R             34.6

  gender party      haha_count
  <chr>  <chr>             <dbl>
1 F      D            84.4
2 F      R            81.9
3 M      D            53.8
4 M      R            64.7

 gender party      wow_count
  <chr>  <chr>             <dbl>
1 F      D            84.4
2 F      R            81.9
3 M      D            53.8
4 M      R            64.7

How can I make the above picture using this data? Many thanks,


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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