import csv in r code example
Example 1: export csv in r
# to store in the current directory
write.csv(data, "data.csv")
# to store in a separate directory
write.csv(data, "file_path\\data.csv")
Example 2: read csv in r
data <- read.csv("input.csv")
print(data)
Example 3: how to import csv file in r
read.csv("yourdata.csv", sep = ';')
Example 4: read csv in r
library(readr)
data <- read_csv("input.csv")