I have 3 lists and I would like to combine them into a dataframe, where each column is an element of a list.
There are the 3 lists (ld is a nummeric with value 112)
ld <- 112
# 3 lists
or <- as.list(rep(0, 8))
thetax <- lapply(0:7, function(x) ld * cos (x * pi / 4))
thetay <- lapply(0:7, function(x) ld * sin (x * pi / 4))
Here is my attempt to combine them into a data.frame
df3 <- data.frame(or, thetax, thetay)
I think this should be very simple and basic but I can't do it.
I have been searching for the answer for hours this and have been trying different things but nothing seems to work so far, and I can't execute it.