으로 매주 데이터를 플로팅 :계산 다음 샘플 데이터를 사용하여 그래프를 만들려고
DF : 여기 오류로 실행하고
ID DAY STORE PRODid QTY GBP PROD
2 8042899 1584 70470 1372 6 9.54 Yogurt
3 8042899 1586 70470 1372 2 3.18 Yogurt
4 8042899 1589 70470 1372 2 3.18 Yogurt
5 8042899 1590 70470 307 3 3.27 Yogurt
6 8042899 1590 70470 300 2 2.18 Yogurt
7 8042899 1590 70470 1372 1 1.59 Yogurt
;
df[, .(total_sales = (sum(QTY) * (GBP))), by = DAY]
ggplot(aes(x = total_sales)) +
geom_histogram(fill = 'steelblue', bins = 50) +
labs(x = 'Day unit sales', title = 'Titlte of plot')
는
DAY
열이
ts
객체없는의 문제인가?
오류가 무엇입니까? –
@PoGibas 좋은 발언 : 나는 모든 히스토그램이나 바 plot (ts 객체에 대한 발언으로 간주)에서가 아니라 timeseries 음모를 말할 것입니다 ... –