How to change row names?

How could I change the row name of a matrix? I used the function gower.dist from statmatch, and after that the row names turn into 1,2,3,4..., how can I keep the original row names or change the names from the matrix.

I think you can use rownames.

rownames(obj_after) <- rownames(obj_before)

That should keep the rownames the same.

1 Like

Thank you very much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.