Can someone help with this:
in a new df2 var2 should be added and df2$var1 should be expanded by df1$var2, filling new lines in Var1 & Var3 as given by variables in df1:
(df1 <- expand.grid(Var2 = letters[1:4], Var1 = 1:3)[1:10, 2:1])
(df2 <- data.frame(Var1 = 1:4, Var3 = LETTERS[1:4]))
wanted:
Var1 Var2 Var3
1 1 a A
2 1 b A
3 1 c A
4 1 d A
5 2 a B
6 2 b B
7 2 c B
8 2 d B
9 3 a C
10 3 b C
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)