How do i convert a Named num [1:4] to a data frame in R?
My preferred way to transpose a data.frame (or data.table) is to use the transpose function found in the data.table package.

It means you might have to install it: install.packages("data.table").
This give you a function that will do what you want. Here is a demo how to use it:

library(data.table)    # makes the transpose function available

col_names &lt;- colnames(worldcup)      # keep track of original column names
wc_2 &lt;- colMeans(worldcup)           # compute the means
wc_2 &lt;- transpose(as.data.frame(wc_2))              # this gives you generic column names
colnames(wc_2) &lt;- col_names          # reapply the column names


Or combining it with your example (not fully tested):

library(magrittr)    # to import the pipe operator: %&gt;%

wc_2 &lt;- worldcup %&gt;% 
  select(Time, Passes, Tackles, Saves) %&gt;%
    colMeans() %&gt;% as.data.frame() %&gt;% transpose()       # you might need to put a dot (`.`) in the empty brackets to pass the argument before the pipe operator


then maybe add the names you would like:

colnames(wc_2) &lt;- col_names


If you like the sound of the package, I recommend going through the mini intro, built in to the package:

install.packages("data.table")        # install it
library(data.table)                   # load it
example(data.table)                   # run the examples section of ?