R, create row and give it a name whist assigning data

37 Views Asked by At

I would like to know if it is possible with R, to create in one go a row, name it and assign it values.

for example, I have.

This df is named domain This df is named domain

and I Have This df is named tactics

This df is named tactics

and I would like to combine both sort of like this

for(aptname in names(result)){
   domain <- t(result[[aptname]][["Domain"]])
   tactics <- t(result[[aptname]][["Tactics"]])
   newdf[nrow[aptname]] <- domain + tactics
}

so the final version would look like this

enter image description here

kind regards,

0

There are 0 best solutions below