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.
为了简单起见:
fg=c(1,8,3,6,4,8,7,9)
我想知道7有多少比fg以百分比表示的值大。
7
fg
sum(fg>7) / length(fg) * 100
尝试这个:
> 100 * mean(fg > 7) [1] 37.5