I want to read csv file skip three lines (except header) but include header names in data.frame. I've tried following but header names are wrong:
> sine = read.csv(file="sine.csv",head=TRUE,sep=",", skip=3, check.names=TRUE)
> colnames(sine)
[1] "X0" "X0.0" "X0.0.1" "X0.0.2" "None" "X1.0" "X0.0.3" "None.1" "X.."
[10] "X0.1" "X0.2"
When I read dataset without skipping three lines header names are OK:
> sine = read.csv(file="sine.csv",head=TRUE,sep=",", skip=0, check.names=TRUE)
> colnames(sine)
[1] "reset"
[2] "angle"
[3] "sine"
[4] "multiStepPredictions.actual"
[5] "multiStepPredictions.1"
[6] "anomalyScore"
[7] "multiStepBestPredictions.actual"
[8] "multiStepBestPredictions.1"
[9] "anomalyLabel"
[10] "multiStepBestPredictions.multiStep.errorMetric..altMAPE..steps..1..window.1000.field.sine"
[11] "multiStepBestPredictions.multiStep.errorMetric..aae..steps..1..window.1000.field.sine"
What I'm doing wrong?