How do I change a single value in a data.frame?

前端 未结 4 1094
迷失自我
迷失自我 2020-12-08 04:20

Could anyone explain how to change a single cell in a data.frame to something else. Basically I just want to rename that one cell, not all cells which matches i

4条回答
  •  粉色の甜心
    2020-12-08 04:36

    data.frame[row_number, column_number] = new_value
    

    For example, if x is your data.frame:

    x[1, 4] = 5
    

提交回复
热议问题