how to read file in r

# Step 1: Specify the file path
file_path <- "path/to/your/file.csv"

# Step 2: Read the file into a data frame
data_frame <- read.csv(file_path)

# Optional: If the file is a different format, use the appropriate function
# For example, for a tab-delimited file, use read.delim():
# data_frame <- read.delim(file_path)

# Optional: View the first few rows of the data frame
head(data_frame)