I tried: L <- readLines(con <- file("log2.log", encoding="UCS-2LE") z <- read.zoo(textConnection(L), index = 1:2,FUN = function(x) paste(x[,1], x[,2])) Error: Error en x[, 1] : número incorreto de dimensiones