How to skip 2nd row while importing the data in R?



I have used the below code to import the csv file. But it removes the top 2 rows. I want only the second row to be removed and I want the header to be there as it is. Can someone please help me?

data = read.csv(“IMDB_data.csv”, header = T, skip = 2)IMDB_data.csv (1.9 MB)

Attached the csv file.


Use this for skip row
read_File = readLines(“filePath”)
dataset = read.csv(textConnection(read_File[-2]), header = TRUE, sep=",")


That worked perfectly. Thanks buddy! :slight_smile:


Easiest way is
Always reduce functions in R as it uses RAM directly. Good luck

closed #5