-1
我有一個數據幀如下:如何在R中的數據表中選擇x軸的某些要求繪製圖形?
>str(df)
'data.frame': 22673 obs. of 6 variables:
$ V1 : Factor w/ 39 levels "2015-02-09","2015-02-09 ",..: 1 1 1 1 1 1 1 1 1 1 ...
$ V2 : Factor w/ 10465 levels "00:48:26","01:49:26",..: 3949 3956 3964 3985 4196 4254 4262 4268 4275 4309 ...
$ V3 : Factor w/ 3 levels "Admin","AmbassadorSchoolPlayer",..: 3 3 3 3 3 3 3 3 1 3 ...
$ V4 : Factor w/ 104 levels "1builder1","22mAsgarfus",..: 77 77 57 77 48 48 48 48 6 77 ...
$ V5 : Factor w/ 8580 levels ""," - -?"," - 14 1",..: 2306 874 7433 3650 2306 2306 3364 6501 3257 2306 ...
df$V4
是USER_NAME,我想要繪製這需要df$V1
作爲x軸,df$V4
作爲y軸的曲線圖。但是考慮到用戶數量太大,我想選擇出現在數據框中的閾值次數(比如10)的那些(用戶名)。我該怎麼做?我對R很新,我已經閱讀了幾篇介紹ggplot2的文章,但沒有找到答案。先謝謝你。
感謝您的幫助!有用!你真好! – southdoor