remove rownumbers r

# Create a sample dataframe
data <- data.frame(
  Name = c("Alice", "Bob", "Charlie"),
  Age = c(25, 30, 22),
  City = c("New York", "San Francisco", "Los Angeles")
)

# Remove row numbers
rownames(data) <- NULL

Explanation:

  1. data.frame: Creates a dataframe with columns "Name", "Age", and "City" containing information about individuals.

  2. Name = c("Alice", "Bob", "Charlie"), Age = c(25, 30, 22), City = c("New York", "San Francisco", "Los Angeles"): Defines the values for the "Name", "Age", and "City" columns respectively.

  3. data <- data.frame(...): Assigns the created dataframe to the variable named "data".

  4. rownames(data) <- NULL: Removes the row names or row identifiers from the dataframe "data". The row names will be reset to default numeric values, essentially removing any custom row identifiers previously present in the dataframe.