The first step is going to be to unlist your list, then index the movie names for those that have the maximum ratings, then store them in a dataframe. Since you didn't really provide aa use case, it is hard to know exactly why you want the format you do, but here is something to get you started I hope.
my_list <- list(movie1 = 5, # a mock movie list
movie2 = 5,
movie3 = 2,
movie4 = 5,
movie5 = 4)
new <- do.call(rbind, my_list) # unlisting the elements into a df
t(
data.frame(
movie = row.names(new)[new == max(new)], # here we store row names of max rows
num = max(new)) # here we provide the max rating
) # finally, transpose `t()`
Hopefully this helps. Alternatively, you could do this to get the literal output you want from a similar list:
my_list <- list(movie1 = 5, # a mock movie list
movie2 = 5,
movie3 = 2,
movie4 = 5,
movie5 = 4)
new <- do.call(rbind, my_list) # unlisting the elements into a df
movie_names <- row.names(new)[new == max(new)] # store all the movie names that have max rating
rep_num <- max(new) # store max rating (to pass to rep and eventually table
len <- length(movie_names) # len to pass to seq_len
table(sapply(seq_len(len), function(i){rep(movie_names[i], rep_num)})) # then finally create a function to repeat the movie name for the max rating and create a table from it.