RStudio rownames_to_column - How to find name of first column to use in this function?

The value of the var argument is the name of the column that will be added to the data frame to accept the row names. You can set that to whatever you want or accept the default value of "rowname".