R store data to text file

# Create a data frame
data <- data.frame(
  Name = c("Alice", "Bob", "Charlie"),
  Age = c(25, 30, 28),
  Height = c(160, 175, 168)
)

# Write the data frame to a text file
write.table(data, "output.txt", sep = "\t", row.names = FALSE)