how to import csv from google drive to r
# Load necessary package
install.packages("googledrive")
library(googledrive)
# Authenticate and mount your Google Drive
drive_auth()
# Get the file ID from the Google Drive link
# Example link: https://drive.google.com/file/d/your_file_id/view
file_id <- "your_file_id"
# Download the file
drive_download(as_id(file_id))
# Read the downloaded file into R
data <- read.csv("your_file_id.csv")