I wish to skip the 1st and 3rd rows of my csv file when importing the file into a data frame in R.
In the original file my headers are on line 2.
Using the skip argument in read.csv I can skip the 1st line and set the header argument to TRUE by I still have the 3rd line from the original file in my data frame.
Can anyone suggest how to skip multiple specific rows in R, below is what I was able to cobble together?
Can I pass a vector to the skip argument specifying the exact rows to ignore?
prach <- read.csv("RSRAN104_-_PRACH_Propagation_Delay-PLMN-day-rsran_RU50EP1_reports_RSRAN104_xml-2016_08_23-21_33_03__604.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE, skip = 1)
comment character
like#
to the 3rd row and then do:read.csv(file, skip = 1, header = T, comment.char = "#")
. – Resurrect