I am creating 15 rows in a dataframe, like this. I cannot show my real code, but the create row function involves complex calculations that can be put in a function. Any ideas on how I can do this using lapply, apply, etc. to create all 15 in parallel and then concatenate all the rows into a dataframe? I think using lapply will work (i.e. put all rows in a list, then unlist and concatenate, but not exactly sure how to do it).

```
for( i in 1:15 ) {
row <- create_row()
# row is essentially a dataframe with 1 row
rbind(my_df,row)
}
```

Something like this should work for you,

The

`create_row`

function is just make the example reproducible, then we predefine an empty list, then fill it with the result from the`create_row()`

function, then convert the resulting list to a data frame.Alternatively, predefine a matrix and use the

`apply`

functions, over the row margin, then use the`t`

(transpose) function, to get the output correct,