R's t
function does not have a method for lists. This pretty little piece of code is effectively that. Say you have a list with three sublists, each containg a vector of ten elements. The three sublists are languages, and the ten elements are words in those languages. Functions from the apply
family only let you loop through languages and with each iteration you have access to all the words from the given language, but only from that language. list.transpose
turns such a list into a list of ten sublists, each containing a vector with three elements -- so you can loop through words, and have in each iteration access to word nr 1 from all three languages, then word nr 2, and so on.