Katrin,
I believe that error message is caused by empty lines of data in the file
being read by read.table().
What is the last value for "j" printed when you run the code?
What does the file look like at rows j to j+8?
Does your code work if you just submit these lines?
for (i in 0)
{ j=subjectquantity+6+i*(subjectquantity+7)
print (j)
results<-read.table(file, header=F, skip=j, nrows=subjectquantity)
}
Jean
Katrin Heimann <katrinheimann@gmail.com> wrote on 11/07/2012 08:51:47
AM:>
> Dear all,
> a program that worked well for weeks today gave me consistently the
error> message
>
> no lines available in input
>
> referring to the lines
>
> for (i in (0:(timeintervals-1)))
> { j=subjectquantity+6+i*(subjectquantity+7)
> print (j)
> results<-read.table(file, header=F, skip=j, nrows=subjectquantity)
>
> timeintervals have been specified as argument as 12
> subjectquantity as 9
>
> the file it should be reading starts like:
>
>
> davide.jtfbase
> elena.jtfbase
> fabio.jtfbase
> francesco.jtfbase
> giulia.jtfbase
> kerstin.jtfbase
> Lucia.jtfbase
> maria.jtfbase
> Stephanomer.jtfbase
> Power
> Mean amplitude averaged over channel group
> left_central: 30, 36, 41, 31, 37, 42, 54, 53
> right_central: 104, 103, 105, 87, 93, 86, 80, 79
> Baseline1 Baseline2
> _left_central _right_central _left_central _right_central
> davide.jtfbase 0.94036 1.03227 1.02403 0.75338
> elena.jtfbase 1.05467 0.52269 0.85483 0.75881
> fabio.jtfbase 1.02207 1.14401 1.15726 0.98496
> francesco.jtfbase 1.39298 0.97169 1.15515 1.23719
> giulia.jtfbase 1.28790 1.54337 1.37583 2.00000
> kerstin.jtfbase 1.78279 1.70336 1.38145 1.06702
> Lucia.jtfbase 1.14633 1.53128 1.19042 1.56369
> maria.jtfbase 1.23954 1.11156 0.60587 0.84131
> Stephanomer.jtfbase 1.09375 1.01436 1.13088 1.17659
>
>
> I really have no idea what is going on, if you could help me that would
be> awesome!
> Best
> Katrin
[[alternative HTML version deleted]]