Aggregation of fields vs field value line chart in R

0 votes
Hi, I have a doubt whether a chart can be plotted with aggregate field values for each x-value if provided?
Jul 25 in Data Analytics by ramya
20 views

1 answer to this question.

0 votes
Of course, it can be done. Let me show an example.

I want to show the average of displ for each value of cyl in mpg dataset.

Create new dataframe for easy implemnetation.

df_new = mpg %>% group_by(cyl) %>% summarise(avg_displ =median(displ))
ggplot(df_new,aes(cyl,avg_displ)) +geom_bar(stat = "identity")
answered Nov 3 by Cherukuri
• 32,260 points

Related Questions In Data Analytics

0 votes
1 answer

How to change the datatype of any field in an external dataset in R?

Hi Anand, Try as below - class(dataset/dataframe$col_name) <- ...READ MORE

answered Jun 27 in Data Analytics by anonymous
• 32,260 points
38 views
0 votes
0 answers
0 votes
0 answers

Any suggestions on how to perform multivariate analysis of fields in R using plots?

Any suggestions on how to perform multivariate ...READ MORE

Jul 22 in Data Analytics by sindhu
29 views
0 votes
0 answers

Edit date values in ggplot line chart -R

Hi, I want to edit the data ...READ MORE

Jul 25 in Data Analytics by rekha
24 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
128 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
184 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points
91 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
115 views
0 votes
1 answer
0 votes
2 answers