GraphicsGrid with a Label for each Column and Row The Next CEO of Stack OverflowPutting a vertical line in each Histogram using GraphicsGridComposite graphics with Row, Column, data aggregation and layout controlControl objects Sizing and placement in Graphicsgrid Vs Grid:Label each panel of GridCombining ArrayPlot and PlotGraphicsGrid Format Problem with SpanFromAboveConstructing a grid from a matrixHow to solve for the intersection points of two ellipses?How to use GraphicsGrid with ListPlots that have a PlotLegend?Rotated Row and Normal Column Headings for a GridPutting a vertical line in each Histogram using GraphicsGrid

What connection does MS Office have to Netscape Navigator?

Aggressive Under-Indexing and no data for missing index

Defamation due to breach of confidentiality

Where do students learn to solve polynomial equations these days?

What can the phrase “is embedded in a whale of a bill” mean?

Physiological effects of huge anime eyes

Won the lottery - how do I keep the money?

Expressing the idea of having a very busy time

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Does destroying a Lich's phylactery destroy the soul within it?

Can you teleport closer to a creature you are Frightened of?

Regression vs Random Forest - Combination of features

Help! I cannot understand this game’s notations!

Can this note be analyzed as a non-chord tone?

Define command that accepts \ in arguments

What was the first Unix version to run on a microcomputer?

In the "Harry Potter and the Order of the Phoenix" videogame, what potion is used to sabotage Umbridge's Speakers?

Can I board the first leg of the flight without having final country's visa?

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

How did Beeri the Hittite come up with naming his daughter Yehudit?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Prepend last line of stdin to entire stdin

Why the last AS PATH item always is `I` or `?`?

Towers in the ocean; How deep can they be built?



GraphicsGrid with a Label for each Column and Row



The Next CEO of Stack OverflowPutting a vertical line in each Histogram using GraphicsGridComposite graphics with Row, Column, data aggregation and layout controlControl objects Sizing and placement in Graphicsgrid Vs Grid:Label each panel of GridCombining ArrayPlot and PlotGraphicsGrid Format Problem with SpanFromAboveConstructing a grid from a matrixHow to solve for the intersection points of two ellipses?How to use GraphicsGrid with ListPlots that have a PlotLegend?Rotated Row and Normal Column Headings for a GridPutting a vertical line in each Histogram using GraphicsGrid










5












$begingroup$


Is it possible to use GraphicsGrid and do something like this?



$beginarraycccc
textX & Label1 & Label2& Label3\
Label4 & Plot1 & Plot2&Plot3\
Label5 & Plot4 & Plot5&Plot6\
Label6 & Plot7 & Plot8&Plot9\
endarray $










share|improve this question









$endgroup$
















    5












    $begingroup$


    Is it possible to use GraphicsGrid and do something like this?



    $beginarraycccc
    textX & Label1 & Label2& Label3\
    Label4 & Plot1 & Plot2&Plot3\
    Label5 & Plot4 & Plot5&Plot6\
    Label6 & Plot7 & Plot8&Plot9\
    endarray $










    share|improve this question









    $endgroup$














      5












      5








      5





      $begingroup$


      Is it possible to use GraphicsGrid and do something like this?



      $beginarraycccc
      textX & Label1 & Label2& Label3\
      Label4 & Plot1 & Plot2&Plot3\
      Label5 & Plot4 & Plot5&Plot6\
      Label6 & Plot7 & Plot8&Plot9\
      endarray $










      share|improve this question









      $endgroup$




      Is it possible to use GraphicsGrid and do something like this?



      $beginarraycccc
      textX & Label1 & Label2& Label3\
      Label4 & Plot1 & Plot2&Plot3\
      Label5 & Plot4 & Plot5&Plot6\
      Label6 & Plot7 & Plot8&Plot9\
      endarray $







      graphics visualization






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 21:05









      An old man in the sea.An old man in the sea.

      1,106919




      1,106919




















          3 Answers
          3






          active

          oldest

          votes


















          5












          $begingroup$

          If you are willing to forego GraphicsGrid and give up some control over the placement of the decorations, it can be as simple as this:



          Make a 3 x 3 array of graphics (this is adopted from a previous answer}



          circles[n_] :=
          Module[r, cntr,
          r := RandomReal[.25];
          cntr := RandomReal[1, 2];
          Graphics[Table[EdgeForm[Black], Hue[RandomReal[]], Disk[cntr, r], n],
          PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]

          lines[] :=
          Module[lf, rt,
          lf := With[x = RandomReal[.48], Red, Line[x, 0, x, 1]];
          rt := With[x = RandomReal[.52, 1], Blue, Line[x, 0, x, 1]];
          Graphics[lf, rt,
          PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]]

          SeedRandom[4];
          graphics =
          Apply[
          Show,
          Partition[Transpose[Table[circles[8], 9], Table[lines[], 9]], 3],
          2];


          Make the headers:



          colHeaders, rowHeaders = Partition[Table[Style[Row["Label", i], "TBI"], i, 6], 3];


          Make the grid with TableForm:



          TableForm[graphics, TableHeadings -> rowHeaders, colHeaders]


          grid






          share|improve this answer











          $endgroup$




















            5












            $begingroup$

            Here is an option:



            plots = Table[Table[Plot[Sin[i x + j], x, 1, 10], i, 3], j, 3];
            xlabels = "", "Label 1", "Label 2", "Label 3";
            ylabels = "Label 4", "Label 5", "Label 6";
            GraphicsGrid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]]]


            enter image description here



            Updated with a slightly prettier option:



            xlabels = Text[Style[#, Large]] & /@ "", "Label 1", "Label 2", "Label 3";
            ylabels = Text[Style[#, Large]] & /@ "Label 4", "Label 5", "Label 6";
            Grid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]], Spacings -> 2, 1]


            enter image description here






            share|improve this answer











            $endgroup$




















              3












              $begingroup$

              You could construct Graphics for the row and column headings. Something like this. Would have to adjust the vertical / horizontal placement of the label text.



              plotGrid = Table[Plot[Sin[x], x, 0, 2 Pi], 2, 2];

              plotRowHeader =
              Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 2];

              plotColumnHeader =
              Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 3,
              4] // Prepend[Graphics[Style[Text["X"], 12]]];

              graphicsGrid =
              plotGrid // Prepend[plotRowHeader] // Transpose //
              Prepend[plotColumnHeader];

              GraphicsGrid[graphicsGrid]


              enter image description here






              share|improve this answer









              $endgroup$













                Your Answer





                StackExchange.ifUsing("editor", function ()
                return StackExchange.using("mathjaxEditing", function ()
                StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
                );
                );
                , "mathjax-editing");

                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "387"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193846%2fgraphicsgrid-with-a-label-for-each-column-and-row%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                5












                $begingroup$

                If you are willing to forego GraphicsGrid and give up some control over the placement of the decorations, it can be as simple as this:



                Make a 3 x 3 array of graphics (this is adopted from a previous answer}



                circles[n_] :=
                Module[r, cntr,
                r := RandomReal[.25];
                cntr := RandomReal[1, 2];
                Graphics[Table[EdgeForm[Black], Hue[RandomReal[]], Disk[cntr, r], n],
                PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]

                lines[] :=
                Module[lf, rt,
                lf := With[x = RandomReal[.48], Red, Line[x, 0, x, 1]];
                rt := With[x = RandomReal[.52, 1], Blue, Line[x, 0, x, 1]];
                Graphics[lf, rt,
                PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]]

                SeedRandom[4];
                graphics =
                Apply[
                Show,
                Partition[Transpose[Table[circles[8], 9], Table[lines[], 9]], 3],
                2];


                Make the headers:



                colHeaders, rowHeaders = Partition[Table[Style[Row["Label", i], "TBI"], i, 6], 3];


                Make the grid with TableForm:



                TableForm[graphics, TableHeadings -> rowHeaders, colHeaders]


                grid






                share|improve this answer











                $endgroup$

















                  5












                  $begingroup$

                  If you are willing to forego GraphicsGrid and give up some control over the placement of the decorations, it can be as simple as this:



                  Make a 3 x 3 array of graphics (this is adopted from a previous answer}



                  circles[n_] :=
                  Module[r, cntr,
                  r := RandomReal[.25];
                  cntr := RandomReal[1, 2];
                  Graphics[Table[EdgeForm[Black], Hue[RandomReal[]], Disk[cntr, r], n],
                  PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]

                  lines[] :=
                  Module[lf, rt,
                  lf := With[x = RandomReal[.48], Red, Line[x, 0, x, 1]];
                  rt := With[x = RandomReal[.52, 1], Blue, Line[x, 0, x, 1]];
                  Graphics[lf, rt,
                  PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]]

                  SeedRandom[4];
                  graphics =
                  Apply[
                  Show,
                  Partition[Transpose[Table[circles[8], 9], Table[lines[], 9]], 3],
                  2];


                  Make the headers:



                  colHeaders, rowHeaders = Partition[Table[Style[Row["Label", i], "TBI"], i, 6], 3];


                  Make the grid with TableForm:



                  TableForm[graphics, TableHeadings -> rowHeaders, colHeaders]


                  grid






                  share|improve this answer











                  $endgroup$















                    5












                    5








                    5





                    $begingroup$

                    If you are willing to forego GraphicsGrid and give up some control over the placement of the decorations, it can be as simple as this:



                    Make a 3 x 3 array of graphics (this is adopted from a previous answer}



                    circles[n_] :=
                    Module[r, cntr,
                    r := RandomReal[.25];
                    cntr := RandomReal[1, 2];
                    Graphics[Table[EdgeForm[Black], Hue[RandomReal[]], Disk[cntr, r], n],
                    PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]

                    lines[] :=
                    Module[lf, rt,
                    lf := With[x = RandomReal[.48], Red, Line[x, 0, x, 1]];
                    rt := With[x = RandomReal[.52, 1], Blue, Line[x, 0, x, 1]];
                    Graphics[lf, rt,
                    PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]]

                    SeedRandom[4];
                    graphics =
                    Apply[
                    Show,
                    Partition[Transpose[Table[circles[8], 9], Table[lines[], 9]], 3],
                    2];


                    Make the headers:



                    colHeaders, rowHeaders = Partition[Table[Style[Row["Label", i], "TBI"], i, 6], 3];


                    Make the grid with TableForm:



                    TableForm[graphics, TableHeadings -> rowHeaders, colHeaders]


                    grid






                    share|improve this answer











                    $endgroup$



                    If you are willing to forego GraphicsGrid and give up some control over the placement of the decorations, it can be as simple as this:



                    Make a 3 x 3 array of graphics (this is adopted from a previous answer}



                    circles[n_] :=
                    Module[r, cntr,
                    r := RandomReal[.25];
                    cntr := RandomReal[1, 2];
                    Graphics[Table[EdgeForm[Black], Hue[RandomReal[]], Disk[cntr, r], n],
                    PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]

                    lines[] :=
                    Module[lf, rt,
                    lf := With[x = RandomReal[.48], Red, Line[x, 0, x, 1]];
                    rt := With[x = RandomReal[.52, 1], Blue, Line[x, 0, x, 1]];
                    Graphics[lf, rt,
                    PlotRange -> 0, 1, 0, 1, PlotRangeClipping -> True, Frame -> True]]

                    SeedRandom[4];
                    graphics =
                    Apply[
                    Show,
                    Partition[Transpose[Table[circles[8], 9], Table[lines[], 9]], 3],
                    2];


                    Make the headers:



                    colHeaders, rowHeaders = Partition[Table[Style[Row["Label", i], "TBI"], i, 6], 3];


                    Make the grid with TableForm:



                    TableForm[graphics, TableHeadings -> rowHeaders, colHeaders]


                    grid







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 24 at 2:05

























                    answered Mar 24 at 1:25









                    m_goldbergm_goldberg

                    88k872199




                    88k872199





















                        5












                        $begingroup$

                        Here is an option:



                        plots = Table[Table[Plot[Sin[i x + j], x, 1, 10], i, 3], j, 3];
                        xlabels = "", "Label 1", "Label 2", "Label 3";
                        ylabels = "Label 4", "Label 5", "Label 6";
                        GraphicsGrid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]]]


                        enter image description here



                        Updated with a slightly prettier option:



                        xlabels = Text[Style[#, Large]] & /@ "", "Label 1", "Label 2", "Label 3";
                        ylabels = Text[Style[#, Large]] & /@ "Label 4", "Label 5", "Label 6";
                        Grid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]], Spacings -> 2, 1]


                        enter image description here






                        share|improve this answer











                        $endgroup$

















                          5












                          $begingroup$

                          Here is an option:



                          plots = Table[Table[Plot[Sin[i x + j], x, 1, 10], i, 3], j, 3];
                          xlabels = "", "Label 1", "Label 2", "Label 3";
                          ylabels = "Label 4", "Label 5", "Label 6";
                          GraphicsGrid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]]]


                          enter image description here



                          Updated with a slightly prettier option:



                          xlabels = Text[Style[#, Large]] & /@ "", "Label 1", "Label 2", "Label 3";
                          ylabels = Text[Style[#, Large]] & /@ "Label 4", "Label 5", "Label 6";
                          Grid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]], Spacings -> 2, 1]


                          enter image description here






                          share|improve this answer











                          $endgroup$















                            5












                            5








                            5





                            $begingroup$

                            Here is an option:



                            plots = Table[Table[Plot[Sin[i x + j], x, 1, 10], i, 3], j, 3];
                            xlabels = "", "Label 1", "Label 2", "Label 3";
                            ylabels = "Label 4", "Label 5", "Label 6";
                            GraphicsGrid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]]]


                            enter image description here



                            Updated with a slightly prettier option:



                            xlabels = Text[Style[#, Large]] & /@ "", "Label 1", "Label 2", "Label 3";
                            ylabels = Text[Style[#, Large]] & /@ "Label 4", "Label 5", "Label 6";
                            Grid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]], Spacings -> 2, 1]


                            enter image description here






                            share|improve this answer











                            $endgroup$



                            Here is an option:



                            plots = Table[Table[Plot[Sin[i x + j], x, 1, 10], i, 3], j, 3];
                            xlabels = "", "Label 1", "Label 2", "Label 3";
                            ylabels = "Label 4", "Label 5", "Label 6";
                            GraphicsGrid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]]]


                            enter image description here



                            Updated with a slightly prettier option:



                            xlabels = Text[Style[#, Large]] & /@ "", "Label 1", "Label 2", "Label 3";
                            ylabels = Text[Style[#, Large]] & /@ "Label 4", "Label 5", "Label 6";
                            Grid[Join[xlabels, Transpose[Join[ylabels, Transpose[plots]]]], Spacings -> 2, 1]


                            enter image description here







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 24 at 2:27

























                            answered Mar 23 at 22:36









                            MelaGoMelaGo

                            5514




                            5514





















                                3












                                $begingroup$

                                You could construct Graphics for the row and column headings. Something like this. Would have to adjust the vertical / horizontal placement of the label text.



                                plotGrid = Table[Plot[Sin[x], x, 0, 2 Pi], 2, 2];

                                plotRowHeader =
                                Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 2];

                                plotColumnHeader =
                                Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 3,
                                4] // Prepend[Graphics[Style[Text["X"], 12]]];

                                graphicsGrid =
                                plotGrid // Prepend[plotRowHeader] // Transpose //
                                Prepend[plotColumnHeader];

                                GraphicsGrid[graphicsGrid]


                                enter image description here






                                share|improve this answer









                                $endgroup$

















                                  3












                                  $begingroup$

                                  You could construct Graphics for the row and column headings. Something like this. Would have to adjust the vertical / horizontal placement of the label text.



                                  plotGrid = Table[Plot[Sin[x], x, 0, 2 Pi], 2, 2];

                                  plotRowHeader =
                                  Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 2];

                                  plotColumnHeader =
                                  Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 3,
                                  4] // Prepend[Graphics[Style[Text["X"], 12]]];

                                  graphicsGrid =
                                  plotGrid // Prepend[plotRowHeader] // Transpose //
                                  Prepend[plotColumnHeader];

                                  GraphicsGrid[graphicsGrid]


                                  enter image description here






                                  share|improve this answer









                                  $endgroup$















                                    3












                                    3








                                    3





                                    $begingroup$

                                    You could construct Graphics for the row and column headings. Something like this. Would have to adjust the vertical / horizontal placement of the label text.



                                    plotGrid = Table[Plot[Sin[x], x, 0, 2 Pi], 2, 2];

                                    plotRowHeader =
                                    Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 2];

                                    plotColumnHeader =
                                    Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 3,
                                    4] // Prepend[Graphics[Style[Text["X"], 12]]];

                                    graphicsGrid =
                                    plotGrid // Prepend[plotRowHeader] // Transpose //
                                    Prepend[plotColumnHeader];

                                    GraphicsGrid[graphicsGrid]


                                    enter image description here






                                    share|improve this answer









                                    $endgroup$



                                    You could construct Graphics for the row and column headings. Something like this. Would have to adjust the vertical / horizontal placement of the label text.



                                    plotGrid = Table[Plot[Sin[x], x, 0, 2 Pi], 2, 2];

                                    plotRowHeader =
                                    Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 2];

                                    plotColumnHeader =
                                    Table[Graphics[Style[Text["Label " <> ToString[i]], 12]], i, 3,
                                    4] // Prepend[Graphics[Style[Text["X"], 12]]];

                                    graphicsGrid =
                                    plotGrid // Prepend[plotRowHeader] // Transpose //
                                    Prepend[plotColumnHeader];

                                    GraphicsGrid[graphicsGrid]


                                    enter image description here







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Mar 23 at 22:37









                                    Rohit NamjoshiRohit Namjoshi

                                    1,5361213




                                    1,5361213



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Mathematica Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        Use MathJax to format equations. MathJax reference.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193846%2fgraphicsgrid-with-a-label-for-each-column-and-row%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Is there a general name for the setup in which payoffs are not known exactly but players try to influence each other's perception of the payoffs?Osborne, Nash equilibria and the correctness of beliefsIs there a name for this family of games (Binomial games?)?Perfect Bayesian EquilibriumCalculating mixed strategy equilibrium in battle of sexesPure Strategy SPNEIs there a commitment mechanism which allows players to achieve pareto optimal solutions?Extensive Form GamesAn $n$-player prisoner's dilemma where a coalition of 2 players is better off defectingTit-For-Stat Strategy Best RepliesPotential solutions of the $n$-player Prisoner's Dilemma

                                        Is flight data recorder erased after every flight?When are black boxes used?What protects the location beacon (pinger) of a flight data recorder?Is there anywhere I can pick up raw flight data recorder information?Who legally owns the Flight Data Recorder?Constructing flight recorder dataWhy are FDRs and CVRs still two separate physical devices?What are the data elements shown on the GE235 flight data recorder (FDR) plot?Are CVR and FDR reset after every flight?What is the format of data stored by a Flight Data Recorder?How much data is stored in the flight data recorder per hour in a typical flight of an A380?Is a smart flight data recorder possible?

                                        Rank groups within a grouped sequence of TRUE/FALSE and NAGrouping functions (tapply, by, aggregate) and the *apply familyCharacters counting and subletting specific patternsWhat is the purpose of setting a key in data.table?data.table vs dplyr: can one do something well the other can't or does poorly?how to make a bar plot for a list of dataframes?How to group by unique values in a list in RPandas - Alternative to rank() function that gives unique ordinal ranks for a columnRank within group in for loop in RData transformation: from dyadic to observational data in RGetting map from purrr to work with paste0