How can I divide one column of a data frame through another?

前端 未结 2 556
余生分开走
余生分开走 2020-12-13 07:35

I wanted to divide one column by another to get the per person time how can I do this?I couldn\'t find anything on how you can divide.

Here is some data that I want

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 08:01

    Hadley Wickham

    dplyr

    packages is always a saver in case of data wrangling. To add the desired division as a third variable I would use mutate()

    d <- mutate(d, new = min / count2.freq)
    

提交回复
热议问题