I'm using "lapply" for write the output of my function in txt format. But, the txt file comes with letters and numbers dirting the output, as follows:
"x"
"1"0.602059991327962
While i need only values, as follows:
0.602059991327962
0.698970004336019
0.778151250383644
Follows the code that i'm using:
box_size<-c(4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,27,30,33,36,40,44,48)
ninbox2 <-c(50,40,33,28,25,22,20,18,16,14,12,11,10,9,8,7,6,6,5,5,4,4)
Log_n<-0
aux_list <- lapply(seq_along(ninbox2), function(j){
Log_n[j] <- log10(box_size[j])
})
lapply(aux_list,function(x) write.table( data.frame(x), 'log.txt' , append= T, sep='' ))