Простой поиск в Google вернул это.
Отлично сработало для меня.
> x <- readLines(textConnection("1
+ Pietje
+ I1 I2 Value
+ 1 1 0.11
+ 1 2 0.12
+ 2 1 0.21
+
+ 2
+ Jantje
+ I1 I2 I3 Value
+ 1 1 1 0.111
+ 3 3 3 0.333"))
> closeAllConnections()
> start <- grep("^[[:digit:]]+$", x)
> mark <- vector('integer', length(x))
> mark[start] <- 1
> # determine limits of each table
> mark <- cumsum(mark)
> # split the data for reading
> df <- lapply(split(x, mark), function(.data){
+ .input <- read.table(textConnection(.data), skip=2, header=TRUE)
+ attr(.input, 'name') <- .data[2] # save the name
+ .input
+ })
> # rename the list
> names(df) <- sapply(df, attr, 'name')
> df
$Pietje
I1 I2 Value
1 1 1 0.11
2 1 2 0.12
3 2 1 0.21
$Jantje
I1 I2 I3 Value
1 1 1 1 0.111
2 3 3 3 0.333
Источник .