I have a dataframe as shown below, in which i would like to plot "FREQ" values on X-axis as a line graph for each class in TYPE with the total count on Y-axis
ID FREQ TYPE
ID1 0.0827068 A
ID2 0.0827068 A
ID3 0.0150376 B
ID4 0.0075188 B
ID5 0.07838 C
ID6 0.0676692 C
I managed to plot a histogram with the below command:
ggplot(CNV.sort1, aes(x = FREQ,y=..density..,fill=TYPE)) + geom_histogram()
geom_line
However, i would need a line graph with the X-axis breaks as shown below and total events at each data point on Y-axis.
I tried using geom_line()
ggplot(CNV.sort1, aes(x = FREQ,y=..density..,fill=TYPE)) + geom_line()
Error in eval(expr, envir, enclos) : object 'density' not found
I am missing out something to get a line graph. Any clues offered will be helpful!!
