K
Size: a a a
K
K
AS
K
AS
K
AS
K
AS
K
K
K
K
K
K
AS
# переходим в директорию с файлами
setwd('docs')
# получаем название файлов
files <- dir()
# переменная для результата
res <- list()
for ( file in files ) {
row <- readLines(file)
row_vec <- unlist(strsplit(row, ","))
df <- data.frame(file_id = as.numeric(gsub('(.*)(\\d*)\\.txt', '\\2', file)),
value = as.numeric(row_vec))
res <- append(res, list( df ) )
}
result <- do.call(rbind, res)
AS
AS
K
K