If you intended the elements of your list to be the columns of your dataframe, you could use as.data.frame(l)
by itself (where l
is whatever the name of your list is). Since you want the elements of your list to be the rows of your dataframe, we also have to enlist the help of do.call("rbind", l)
:
# Since you decided not to helpfully provide your data in an easily usable
# form, such as via the output of dput(), I recreate some of it here:
l <- list(c(-3.3354997, 0.2301914, 1.0979842),
c(-3.3275922, 0.2505644, 0.8881143))
# We can use as.data.frame() on the output of do.call("rbind", l) to make
# the dataframe you're looking for:
(l_df <- as.data.frame(do.call("rbind", l)))
# V1 V2 V3
# 1 -3.335500 0.2301914 1.0979842
# 2 -3.327592 0.2505644 0.8881143
# Here's the column name you wanted:
names(l_df) <- c("mu", "szig", "kszi")
# We can then add your new column normally:
l_df$new_column <- 1-exp(-(1+l_df$kszi*((0-l_df$mu)/l_df$szig))^(-1/l_df$kszi))
# And let's take a look at the result:
l_df
# mu szig kszi new_column
# 1 -3.335500 0.2301914 1.0979842 0.07328838
# 2 -3.327592 0.2505644 0.8881143 0.05511381
As I mention in the comments to the code above, for future reference it is much more helpful to potential answerers if you post your example data using the output of the dput()
command. See How to make a great R reproducible example for more details.