How do I reference the row number of an observation? For example, if you have a data.frame called \"data\" and want to create a variable data$rownumber
data.frame
data$rownumber
Simply:
data$rownumber = 1:nrow(Data)