Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How to keep list's element's names with lapply(seq_along())?

$
0
0

I would like to keep my dataframes' names after each lapply sequence with this code. The resulting list (list2) have all my dataframes names disappeared. How do I improve it? Thank you.

list2<-lapply(seq_along(list1), function(i, USE.NAMES=T){
  matrix_a%*%list1[[i]]
})

Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>