My R data frame (electronics) look like this:
date manufacture price
2019-11-22 11:30:04 Apple 600.00
2019-01-16 01:74:14 Samsung 877.00
2019-07-12 04:23:31 Apple 925.00
2019-07-12 01:21:54 Apple 1200.00
2019-01-16 04:48:34 Samsung 1100.00
2019-07-12 12:20:22 Apple 1450.00
2019-03-28 06:23:11 Apple 1250.00
What I want to do are the following:
- Take the
sumofpricefor each given day (date) and create a chart to see thesaleof eachManufacturebydate dateis going to be onx-axisand line plot that has the price of manufacture- Basically I want to see the chart sum of sales overtime per the manufacture.
What did I do?
ggplot(electronics,
aes(date,sum(price))) +
geom_point() +
geom_smooth(method="lm") +
facet_grid(manufacture)
However, it seems like I am not getting proper chart. Please kindly help me solve this. Thank you!

~infacet_grid(~manufacture)Dateand price first?