Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 RMySQL 从服务器检索表。结果有列
id CountryCode date Value
CountryCode可以重复n次。
CountryCode
我想做的是获取所有CountryCodes 的总数,然后绘制结果。
我是 R 新手,所以我不确定这是用 a 完成的,for还是有更简单的方法可以通过 data.frame 来获取这些信息。
for
我感谢任何正确方向的提示谢谢!
假设这些在名为“dfrm”的数据框中:
ctbl <- table(dfrm$CountryCode) plot(ctble)