This a very small part of the dataset that im working with but,
Under SUBJNO the rowname is CAN1,,,,CAN6. I am trying to change that to say Cancer Patient for all 6 rows. I've tried rownames, rownames.df, but for some reason I keep getting errors. Any help is greatly appreciated. Thanks
I want the data under the column SUBNO that currently stores CAN1 through CAN6 to be renamed to the same name "Cancer Patient" for all six rows. Essentially have the name Cancer Patient repeated for six rows. I'm sorry I will update it more when I get home
It would be the same method, no matter how large the data. The mutate function updates variables. In this case, it makes SUBJNO="Cancer Patient" for all rows.
Would I have to ~SUBJNO, ~X, ~Y,
'CAN1', 96.2, 2.52,
'CAN2', 85.0, 4.28,
'CAN3', 89.5, 3.67,
'CAN4', 98.1, 3.33,
'CAN5', 89.7, 3.34,
'CAN6', 84.3, 3.55
)
Would I need to insert [1:500] within the mutate
That part of the code is just sample data for reproducibility purposes, you don't need to type the values, you just have to replace testdat for the name of your actual data set.