I have a list of dataframes with varying rows and columns. Here is an example:
> df_input_list
[[1]]
Feature Method
1 Feat1 Variant1
2 Feat2 Variant2
[[2]]
Feature2 Method2 Attribute
1 Feat3 Variant3 Attr1
2 Feat4 Variant4 Attr2
3 Feat5 Variant5 Attr3
Now I want to add strings to the entire dataframes in a list with lengt n, however, with varying strings to the respective dfs. Like this:
> df_input_list
[[1]]
Feature Method
1 String1_Feat1 String1_Variant1
2 String1_Feat2 String1_Variant2
[[2]]
Feature2 Method2 Attribute
1 String2_Feat3 String2_Variant3 String2_Attr1
2 String2_Feat4 String2_Variant4 String2_Attr2
3 String2_Feat5 String2_Variant5 String2_Attr3
I tried for loops with paste(), but I can not figure out the correct way.