How to calculate median of profits for a particular country

前端 未结 3 1663
没有蜡笔的小新
没有蜡笔的小新 2021-01-28 15:32

Hello folks, I am new to R and I am trying to compute median profit for a particular country in a data frame.I tried below one but it doesn\'t work for me.

3条回答
  •  长发绾君心
    2021-01-28 16:01

    I was able to calculate median values for a metric in column 11 by US state in dataframe 'outcome3' using:

    tapply(outcome3[,11], outcome3$State, median)

提交回复
热议问题