r - How to iterate across two different margins of dataframe/matrix/array? -


i have 2 dimensional object (numeric), , trying create following output, use in table (format markdown). current object 7x7, ive done manually, anticipate larger objects in future , want figure out correct way of doing it.

i iterate columns while keeping row constant, iterate row object 1 , continue process.

i tried writing various functions , passing multiple arguments, in conjunction apply unable figure out margins/patterns.

paste(dalym[1,1], "|", dalym[1,2], " (", dalym[1,3], ")|", dalym[1,4], " (", dalym[1,5], ")|", dalym[1,6], " (", dalym[1,7], ")|", dalyp[1,],"%", sep="") paste(dalym[2,1], "|", dalym[2,2], " (", dalym[2,3], ")|", dalym[2,4], " (", dalym[2,5], ")|", dalym[2,6], " (", dalym[2,7], ")|", dalyp[2,],"%", sep="") paste(dalym[3,1], "|", dalym[3,2], " (", dalym[3,3], ")|", dalym[3,4], " (", dalym[3,5], ")|", dalym[3,6], " (", dalym[3,7], ")|", dalyp[3,],"%", sep="") paste(dalym[4,1], "|", dalym[4,2], " (", dalym[4,3], ")|", dalym[4,4], " (", dalym[4,5], ")|", dalym[4,6], " (", dalym[4,7], ")|", dalyp[4,],"%", sep="") paste(dalym[5,1], "|", dalym[5,2], " (", dalym[5,3], ")|", dalym[5,4], " (", dalym[5,5], ")|", dalym[5,6], " (", dalym[5,7], ")|", dalyp[5,],"%", sep="") paste(dalym[6,1], "|", dalym[6,2], " (", dalym[6,3], ")|", dalym[6,4], " (", dalym[6,5], ")|", dalym[6,6], " (", dalym[6,7], ")|", dalyp[6,],"%", sep="") paste(dalym[7,1], "|", dalym[7,2], " (", dalym[7,3], ")|", dalym[7,4], " (", dalym[7,5], ")|", dalym[7,6], " (", dalym[7,7], ")|", dalyp[7,],"%", sep="") 


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -