I have vendor_list
vendor_list[57:59]
[[1]]
[1] "ibm"
[[2]]
[1] "apache" "canonical" "apple" "novell"
[[3]]
[1] "gnu" "oracle"
And I have problemtype_list
problemtype_list[57:59]
[[1]]
[1] "NVD-CWE-Other"
[[2]]
[1] "NVD-CWE-Other"
[[3]]
[1] "CWE-824"
I need to combine them to make a data frame such that such that
A B
ibm NVD-CWE-Other
apache NVD-CWE-Other
canonical NVD-CWE-Other
apple NVD-CWE-Other
novelle NVD-CWE-Other
gnu CWE-824
oracle CWE-824
I have seen similar question Combine two lists in a dataframe in R
But it gives me error
do.call(rbind, Map(data.frame, A=problemtype_list, B=vendor_list))
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 1, 0
EDIT
My structure of each list
str(vendor_list)
$ : chr "cisco"
$ : NULL
$ : chr [1:5] "redhat" "novell" "debian" "oracle" ...
$ : chr [1:4] "redhat" "novell" "debian" "google"
$ : chr [1:4] "redhat" "novell" "debian" "google"
str(problemtype_list)
$ : chr "CWE-254"
$ : chr "CWE-79"
$ : chr "NVD-CWE-Other"
$ : chr "NVD-CWE-Other"
$ : chr "CWE-254"
$ : chr "CWE-189"
$ : chr "CWE-119"