Data.txt:
Index;Time;
1;2345;
2;1423;
3;5123;
The code:
dat <- read.table('data.txt', skip = 1, nrows = 2, header =TRUE, sep =';')
The result:
X1 X2345
1 2 1423
2 3 5123
I expect the header to be Index and Time, as follows:
Index Time
1 2 1423
2 3 5123
How do I do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…