Skip to content

Commit

Permalink
version 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bquast authored and cran-robot committed Jun 19, 2022
1 parent 1c3f570 commit 5b15929
Show file tree
Hide file tree
Showing 6 changed files with 232 additions and 20 deletions.
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Package: diagonals
Title: Block Diagonal Extraction or Replacement
Version: 6.0.0
Authors@R: person("Bastiaan", "Quast", email = "bquast@gmail.com", role = c("aut", "cre"))
Version: 6.4.0
Authors@R: person("Bastiaan", "Quast", email = "bquast@gmail.com", role =
c("aut", "cre"), comment=c(ORCID="0000-0002-2951-3577"))
Description: Several tools for handling block-matrix diagonals and similar
constructs are implemented. Block-diagonal matrices can be extracted or removed
using two small functions implemented here. In addition, non-square matrices
Expand All @@ -18,8 +19,8 @@ VignetteBuilder: knitr
RoxygenNote: 7.1.1
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2021-05-08 15:56:56 UTC; bquast
Author: Bastiaan Quast [aut, cre]
Packaged: 2022-06-19 18:16:33 UTC; bquast
Author: Bastiaan Quast [aut, cre] (<https://orcid.org/0000-0002-2951-3577>)
Maintainer: Bastiaan Quast <bquast@gmail.com>
Repository: CRAN
Date/Publication: 2021-05-08 16:20:02 UTC
Date/Publication: 2022-06-19 18:40:02 UTC
10 changes: 5 additions & 5 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
9f9dbed949cad66d588115161224f11d *DESCRIPTION
b77148dd67b7c452b91fa4c881a68009 *DESCRIPTION
e12c49c471a5852114b53c9169f1f30a *NAMESPACE
560478f2ea53018270397b4ccf12c40e *NEWS.md
56e8245b0f8fed3dba26e05a95054955 *NEWS.md
a671bc734a736f0416ba6f849ce8d2da *R/diagonals.R
faec8ede86c4079b14aa4e458554d8bb *R/fatdiag.R
2691863cc52ccddc31bd1827f4d36316 *R/split_vector.R
df94e4c5a2f52c90b8353290ce002150 *README.md
ed6d78eadd0da0727300a48ac798a4d4 *build/vignette.rds
39943dc738db248b70d33f3e51009a47 *README.md
deb09b9ba298a6161a09226d8b15b5db *build/vignette.rds
16b8f62a96356bce35c3af6a8f67c3bf *inst/CITATION
236806de24350bcca2a94a3068fb0ce7 *inst/doc/fatdiag.R
710a36187a4e814032e9d34b62a84057 *inst/doc/fatdiag.Rmd
359f68c228656756005b141b0ef3939f *inst/doc/fatdiag.html
4c609fda853691c3ad15f04edcf593c8 *inst/doc/fatdiag.html
a955855b31981564a62d75ebe41645bf *man/diagonals.Rd
e57a731d495773c6d0aaa17c5b2f323c *man/fatdiag.Rd
54c7d6835c11c30534f75fd7569cf69e *man/split_vector.Rd
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
diagonals 6.4.0
===================

* redo documentation
* add ORCID
* switch from Travis to GitHub Actions
* various URL updates


diagonals 5.3.0
===================

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ diagonals
[![License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
[![CRAN Version](https://www.r-pkg.org/badges/version/diagonals)](https://cran.r-project.org/package=diagonals)
[![R build status](https://github.com/bquast/diagonals/workflows/R-CMD-check/badge.svg)](https://github.com/bquast/diagonals/actions?workflow=R-CMD-check)
[![Coverage status](https://codecov.io/gh/bquast/diagonals/branch/master/graph/badge.svg?token=5wyvKFobQt)](https://codecov.io/gh/bquast/diagonals)[![Total RStudio Cloud Downloads](http://cranlogs.r-pkg.org/badges/grand-total/diagonals?color=brightgreen)](https://cran.r-project.org/package=diagonals)
[![Coverage status](https://codecov.io/gh/bquast/diagonals/branch/master/graph/badge.svg?token=5wyvKFobQt)](https://app.codecov.io/gh/bquast/diagonals)
[![Total RStudio Cloud Downloads](http://cranlogs.r-pkg.org/badges/grand-total/diagonals?color=brightgreen)](https://cran.r-project.org/package=diagonals)
[![RStudio Cloud Downloads](https://cranlogs.r-pkg.org/badges/diagonals?color=brightgreen)](https://cran.r-project.org/package=diagonals)

Block-diagonal matrices can be extracted or removed using two small functions implemented here, in addition, non-square matrices are supported.
Expand Down
Binary file modified build/vignette.rds
Binary file not shown.
219 changes: 210 additions & 9 deletions inst/doc/fatdiag.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@

<meta name="author" content="Bastiaan Quast" />

<meta name="date" content="2021-05-08" />
<meta name="date" content="2022-06-19" />

<title>Fat Diagonals</title>

<script src="data:application/javascript;base64,Ly8gUGFuZG9jIDIuOSBhZGRzIGF0dHJpYnV0ZXMgb24gYm90aCBoZWFkZXIgYW5kIGRpdi4gV2UgcmVtb3ZlIHRoZSBmb3JtZXIgKHRvCi8vIGJlIGNvbXBhdGlibGUgd2l0aCB0aGUgYmVoYXZpb3Igb2YgUGFuZG9jIDwgMi44KS4KZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsIGZ1bmN0aW9uKGUpIHsKICB2YXIgaHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCJkaXYuc2VjdGlvbltjbGFzcyo9J2xldmVsJ10gPiA6Zmlyc3QtY2hpbGQiKTsKICB2YXIgaSwgaCwgYTsKICBmb3IgKGkgPSAwOyBpIDwgaHMubGVuZ3RoOyBpKyspIHsKICAgIGggPSBoc1tpXTsKICAgIGlmICghL15oWzEtNl0kL2kudGVzdChoLnRhZ05hbWUpKSBjb250aW51ZTsgIC8vIGl0IHNob3VsZCBiZSBhIGhlYWRlciBoMS1oNgogICAgYSA9IGguYXR0cmlidXRlczsKICAgIHdoaWxlIChhLmxlbmd0aCA+IDApIGgucmVtb3ZlQXR0cmlidXRlKGFbMF0ubmFtZSk7CiAgfQp9KTsK"></script>
<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
</script>

<style type="text/css">
code{white-space: pre-wrap;}
Expand All @@ -28,6 +40,7 @@
</style>



<style type="text/css">
code {
white-space: pre;
Expand Down Expand Up @@ -127,7 +140,187 @@



<link rel="stylesheet" href="data:text/css,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" type="text/css" />
<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap;
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }

code > span.kw { color: #555; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #d14; }
code > span.fl { color: #d14; }
code > span.ch { color: #d14; }
code > span.st { color: #d14; }
code > span.co { color: #888888; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #900; font-weight: bold; }
code > span.er { color: #a61717; background-color: #e3d2d2; }
</style>



Expand All @@ -141,11 +334,13 @@

<h1 class="title toc-ignore">Fat Diagonals</h1>
<h4 class="author">Bastiaan Quast</h4>
<h4 class="date">2021-05-08</h4>
<h4 class="date">2022-06-19</h4>



<p>Fat diagonal matrices occur when we combine two dimensions of a data set along one edge of a matrix. For example, trade-flow data in the <a href="https://cran.r-project.org/package=decompr">decompr</a> and <a href="https://cran.r-project.org/package=gvc">gvc</a> package have each country-industry combination occur on each edge of the matrix.</p>
<p>Fat diagonal matrices occur when we combine two dimensions of a data
set along one edge of a matrix. For example, trade-flow data in the <a href="https://cran.r-project.org/package=decompr">decompr</a> and <a href="https://cran.r-project.org/package=gvc">gvc</a> package have each
country-industry combination occur on each edge of the matrix.</p>
<p>A fat diagonal matrix looks like this.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(diagonals)</span></code></pre></div>
<pre><code>##
Expand All @@ -167,7 +362,10 @@ <h4 class="date">2021-05-08</h4>
## [10,] 0 0 0 0 0 0 0 0 1 1 1 1
## [11,] 0 0 0 0 0 0 0 0 1 1 1 1
## [12,] 0 0 0 0 0 0 0 0 1 1 1 1</code></pre>
<p>The workhorse function of this package is the <code>fatdiag</code> function, which tries behave similarly to the <code>diag</code> function from the <code>base</code> package, but then with diagonals being <strong>fat</strong>.</p>
<p>The workhorse function of this package is the <code>fatdiag</code>
function, which tries behave similarly to the <code>diag</code> function
from the <code>base</code> package, but then with diagonals being
<strong>fat</strong>.</p>
<p>We can also use the function to assign values to the diagonal.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>( m <span class="ot">&lt;-</span> <span class="fu">matrix</span>(<span class="dv">111</span>, <span class="at">nrow=</span><span class="dv">6</span>, <span class="at">ncol=</span><span class="dv">9</span>) )</span></code></pre></div>
<pre><code>## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
Expand All @@ -186,11 +384,13 @@ <h4 class="date">2021-05-08</h4>
## [4,] 111 111 111 5 5 5 111 111 111
## [5,] 111 111 111 111 111 111 5 5 5
## [6,] 111 111 111 111 111 111 5 5 5</code></pre>
<p>As can be seen from the above example, the blocks and matrices do not have to be square.</p>
<p>As can be seen from the above example, the blocks and matrices do not
have to be square.</p>
<p>The diagonal of a matrix can also be extracted.</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">fatdiag</span>(m, <span class="at">steps=</span><span class="dv">3</span>)</span></code></pre></div>
<pre><code>## [1] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5</code></pre>
<p>We can also specify the size of the block in stead of the number of steps.</p>
<p>We can also specify the size of the block in stead of the number of
steps.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">fatdiag</span>(<span class="dv">12</span>, <span class="at">size=</span><span class="dv">4</span>)</span></code></pre></div>
<pre><code>## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
## [1,] 1 1 1 1 0 0 0 0 0 0 0 0
Expand All @@ -205,7 +405,8 @@ <h4 class="date">2021-05-08</h4>
## [10,] 0 0 0 0 0 0 0 0 1 1 1 1
## [11,] 0 0 0 0 0 0 0 0 1 1 1 1
## [12,] 0 0 0 0 0 0 0 0 1 1 1 1</code></pre>
<p>This also gives us flexibility in terms of having non-square blocks (and consequently matrices).</p>
<p>This also gives us flexibility in terms of having non-square blocks
(and consequently matrices).</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">fatdiag</span>(<span class="dv">12</span>, <span class="at">size=</span><span class="fu">c</span>(<span class="dv">3</span>,<span class="dv">4</span>) )</span></code></pre></div>
<pre><code>## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
## [1,] 1 1 1 1 0 0 0 0 0 0 0 0
Expand Down

0 comments on commit 5b15929

Please sign in to comment.