Convert SVG with image not working in safari - image

i want to convert a SVG with an image inside into a png.
In Firefox and Chrome everything works perfect, but in Safari the conversion is ignoring the image inside the SVG.
The library i am using is html-to-image (html2canvas gave me the same result)
Here is a codepen (the face is the image)
https://codepen.io/RainPara/pen/MWvqZNz
var node = document.getElementById('item');
htmlToImage.toPng(node)
.then(function (dataUrl) {
var img = new Image();
img.src = dataUrl;
document.body.appendChild(img);
})
.catch(function (error) {
console.error('oops, something went wrong!', error);
});
Maybe someone can help me

Testing your example on iOS safari(v15), I've also encountered this issue.
Basically, the svg to image conversion process involves:
creating a Blob/Blob URL (see also What is a blob URL and why it is used?)
render it to a canvas
return a data url
For some reasons (at least some) safari versions, apparently need some delay to render the canvas properly.
This example employs both the initially used html2canvas (library/script based) and a stripped down js code.
function save() {
var node = document.getElementById("item");
htmlToImage
.toPng(node)
.then(function (dataUrl) {
var img = new Image();
//img.width = nodeW;
//img.height = nodeH;
img.src = dataUrl;
let imgWrp = document.createElement("div");
imgWrp.classList.add("img-wrp");
imgWrp.appendChild(img);
document.body.appendChild(imgWrp);
})
.catch(function (error) {
console.error("oops, something went wrong!", error);
});
}
function svg2Png(selector) {
const svgEl = document.querySelector(selector);
let svgBB = svgEl.getBBox();
let svgW = svgBB.width;
let svgH = svgBB.height;
let blob = new Blob([svgEl.outerHTML], {type: 'image/svg+xml'});
let URL = window.URL;
let blobURL = URL.createObjectURL(blob);
let tmpImg = new Image();
tmpImg.src = blobURL;
tmpImg.width = svgW;
tmpImg.height = svgH;
tmpImg.onload = () => {
let canvas = document.createElement("canvas");
canvas.width = svgW;
canvas.height = svgH;
let context = canvas.getContext("2d");
// draw blob img to canvas with some delay
setTimeout(function () {
context.drawImage(tmpImg, 0, 0, svgW, svgH);
let pngDataUrl = canvas.toDataURL();
let svgImg = document.createElement("img");
svgImg.width = svgW;
svgImg.height = svgH;
svgImg.class = "svgImg";
svgImg.src = pngDataUrl;
// just additional wrapping for example usage
let imgWrp = document.createElement("div");
imgWrp.setAttribute("class", "img-wrp img-wrp-vanilla");
imgWrp.appendChild(svgImg);
document.body.appendChild(imgWrp);
}, 300);
};
}
.btn-wrp{
display:flex;
}
button{
width:100%;
padding:0.5em;
}
.img-wrp{
display:inline-block;
font-size:25vw;
width:1em;
height: 1em;
border: 2px solid green
}
.img-wrp-svg{
border: 2px solid red
}
.img-wrp-vanilla{
border: 2px solid orange
}
.img-wrp>*{
width:100%;
height:auto;
}
img{
/*
display:inline-block;
font-size:10em;
width:1em;
height: 1em;
*/
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/html-to-image/1.9.0/html-to-image.js"></script>
<div class="btn-wrp">
<button type="button" onclick="save()">Convert svg (html-to-image.js)</button>
<button type="button" onclick="svg2Png('svg')">svg2Png</button>
</div>
<div class="img-wrp img-wrp-svg">
<svg id="item" width="500" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 500">
<defs>
<mask id="a" x="197" y="42" width="127.3" height="51.7" maskUnits="userSpaceOnUse">
<g data-name="c">
<path data-name="b" d="M301 92c-7-8-13-17-39-19-28-2-36 8-44 19s-24-28-19-33c10-10 35-18 59-16 42 3 71 24 66 36s-19 19-23 13Z" fill="#fff" />
</g>
</mask>
<mask id="b" x="184" y="42" width="140.7" height="60.2" maskUnits="userSpaceOnUse">
<g data-name="c">
<path data-name="b" d="M301 92c-7-8-13-17-39-19-28-2-36 8-44 19s-24-28-19-33c10-10 35-18 59-16 42 3 71 24 66 36s-19 19-23 13Z" fill="#fff" />
</g>
</mask>
<mask id="c" x="198" y="42" width="126.4" height="51.7" maskUnits="userSpaceOnUse">
<g data-name="c">
<path data-name="b" d="M301 92c-7-8-13-17-39-19-28-2-36 8-44 19s-24-28-19-33c10-10 35-18 59-16 42 3 71 24 66 36s-19 19-23 13Z" fill="#fff" />
</g>
</mask>
<mask id="d" x="195" y="42" width="136.4" height="63" maskUnits="userSpaceOnUse">
<g data-name="c">
<path data-name="b" d="M301 92c-7-8-13-17-39-19-28-2-36 8-44 19s-24-28-19-33c10-10 35-18 59-16 42 3 71 24 66 36s-19 19-23 13Z" fill="#fff" />
</g>
</mask>
</defs>
<path d="M0 0h500v500H0Z" fill="none"/>
<path d="M410 471c0 16-74 29-166 29S78 487 78 471s75-29 166-29 166 13 166 29" style="isolation:isolate" opacity=".2"/>
<path d="M170 439a7 7 0 0 1-2 0c-6 2-26-1-31-4h-1c-4-3-5-8-3-17 3-10 9-10 13-9v8s12 8 22 2l2-6c5 1 9 2 9 9 0 5-4 14-9 17" fill="#f0f0f0" />
<path d="M146 417v-8a12 12 0 0 0-5 0 11 11 0 0 0 5 8" fill="#ebdfd4" />
<path d="M133 420c1 7 7 4 12 4s10 4 15 2c3-1 2-3 0-5-7 1-14-4-14-4a11 11 0 0 1-5-8c-3 1-6 3-8 9v2" fill="#fff" />
<path d="m170 413-2 6-2 1a6 6 0 0 1 1 1c2 5-2 9-6 11a26 26 0 0 1-8 1l-10 2a17 17 0 0 1-8-1 8 8 0 0 0 1 1h1c5 2 25 6 31 4a6 6 0 0 0 2 0c5-3 9-12 9-17 1-7-4-8-9-9" fill="#d4d4d4" />
<path d="M314 437a10 10 0 0 1-5-8c-2-15 8-15 11-15a46 46 0 0 1 3 8s9 4 19-2a62 62 0 0 0 3-10c6 0 10 3 11 13 0 5-2 9-5 11s-8 4-14 5c-8 1-17 1-23-2" fill="#f0f0f0" />
<path d="M356 423c-1-10-5-13-11-13a62 62 0 0 1-3 10 22 22 0 0 1-2 1v1c3-1 7-5 10-4 4 1 3 5 2 8-2 4-8 6-14 6a13 13 0 0 1-5 4c-5 3-12 3-18 1 6 3 14 3 22 2 6-1 11-2 14-5s5-6 5-11" fill="#d4d4d4" />
<path d="M349 423a10 10 0 0 0 3-2 5 5 0 0 0-3-5 15 15 0 0 1-5 3l-2 1c-8 5-17 3-19 2a26 26 0 0 1-5-2c-2-1-5-2-5-5-3 2-5 6-4 14a10 10 0 0 0 5 8 18 18 0 0 0 7 2 16 16 0 0 0 1-5 9 9 0 0 1 0-2 3 3 0 0 1 1-2l8-1 9-3 9-3" fill="#fff" />
<path d="M320 414c-6-19-11-24-11-24-47 13-127-1-127-1-7 10-9 16-12 24l-2 6c-10 6-22-2-22-2v-8c0-28 5-57 6-59 21 5 189-2 189-2 5 16 5 53 4 62a62 62 0 0 1-3 10c-9 6-19 2-19 2a73 73 0 0 0-3-8" fill="#d61535" />
<path d="M151 380a38 38 0 0 0-4 0 268 268 0 0 0-1 29v8s7 5 15 4a213 213 0 0 0 3-24c1-9-3-16-13-17" fill="#f1183c" />
<path d="M341 348s-168 7-189 2l-3 17c30 14 62 22 94 27a27 27 0 0 0 8-14c3 8 11 13 20 15 13 0 26-2 37-5 10-4 21-5 26 7a73 73 0 0 1 3 25 20 20 0 0 0 5-2 62 62 0 0 0 3-10c1-9 1-46-4-62" fill="#bf132f" />
<path d="M353 464c7 8 12 17 11 19s-43-7-44-9l-6-37c6 3 15 3 23 2 6-1 11-2 14-5l2 30" fill="#f1183c" />
<path d="m353 464-2-29v-1c-3 3-8 4-14 5-8 1-17 1-23-2l1 4a43 43 0 0 0 15 5c0 9 2 17 7 24 8 6 17 10 27 12 0-3-5-11-11-18" fill="#d61535" />
<path d="M137 435c5 2 25 6 31 4a6 6 0 0 0 2 0c-1 6-3 32-7 33s-57 3-57 1 27-17 27-19l3-19h1" fill="#f1183c" />
<path d="M168 440c-6 1-24-2-30-4a65 65 0 0 0 10 6c4 1 10 2 11 6 2 3 0 9-1 12-1 5-2 9-6 11a51 51 0 0 1-10 3c11 0 19-1 21-2 3-1 6-27 7-33a6 6 0 0 1-2 1" fill="#d61535" />
<path d="M146 471a18 18 0 0 0 6-3 48 48 0 0 1-6 3" fill="#d61535" />
<path d="m135 439-2 14c6 2 10 3 14 8a74 74 0 0 0 5-16l-17-6m-5 18c-6 4-21 11-24 14 12 2 23 0 33-4a32 32 0 0 0-9-10" fill="#ff3153" />
<path d="M355 466a45 45 0 0 0-27 5c15-11 25-9 25-9l1 4" fill="#bf132f" />
<path d="M333 455c-1-4-2-7-5-9a4 4 0 0 0-6 1c-2 3-2 6-2 10 1 4 1 8 4 10 2 3 7 3 9-1v-11m14 20c-2-3-3-5-6-5s-4-1-6 1c-1 2 1 4 2 5a12 12 0 0 0 3 1 15 15 0 0 1 3 1 3 3 0 0 0 4-3" fill="#ff3153" />
<path d="M308 98c2 6 7 16 3 29-3 14-12 14-18 10s-12-8-17-7l-41-6c-6-2-12 2-17 5s-11 3-14-9 5-30 12-35v1s48-8 92 12" fill="#f6aa76" />
<path data-name="mehrdunkel" d="M83 202c6-5 41 45 37 48-6 2-42-44-37-48" fill="var(--main-objekte-mehrdunkel)" />
<path d="m178 287-1 2a78 78 0 0 0-6 40s-8 2-10-1v-6c0-9 2-26 6-34a12 12 0 0 1 1-2c3-3 10 1 10 2m156-5 6 36a38 38 0 0 1 0 7c-1 4-13 2-13 2v-6c-1-19-4-31-6-37a37 37 0 0 0-3-6s10-3 14 0a9 9 0 0 1 2 4" fill="#ff3153" />
<path d="M279 306a39 39 0 0 1 5 0c3 0 3 7 0 7a118 118 0 0 1-18 1c-4 0-4-6-1-7a38 38 0 0 1 6-1h8" fill="#ffbd4d" />
<path d="M210 328v-29a24 24 0 0 1 2-8c2-5 5-7 10-7a348 348 0 0 1 47 0c3 0 6 1 8 4 1 3 2 8 2 18h-8c0-4 1-14-9-14h-32c-7 1-9 2-10 11a111 111 0 0 0 0 23c0 5 4 6 11 6h32c5-1 9-4 8-18h8v20c0 7-6 7-9 7a571 571 0 0 0-42 0c-13 0-18-3-18-10v-3" fill="#f4b837" />
<path d="M279 314h-3v17c0 7-6 7-9 7a571 571 0 0 0-43 0c-6 0-10 0-13-2 2 4 7 5 17 5a700 700 0 0 1 42 0c3 0 9 0 9-7v-20m-58 14a8 8 0 0 1-1-2 111 111 0 0 1 0-23c1-9 3-10 10-11h32a10 10 0 0 1 4 0c-2-2-4-3-8-3h-32c-7 1-9 2-10 11a111 111 0 0 0 0 23c1 3 2 5 5 5m56-40a7 7 0 0 0-4-3c2 3 3 8 3 18h-5v3h8c0-10-1-15-2-18" fill="#c2732e" />
<path d="M279 314h-8v4a42 42 0 0 0 8 1v-5m-8-8h8v-2a83 83 0 0 0-8 0v2" fill="#f0953a" />
<path d="M163 40c1 9 2 11-2 20v1c-10 16-36 14-38-11s32-30 40-10" fill="#f0f0f0" />
<path d="M145 53c5-10 1-17-5-20a11 11 0 0 0-10 2 13 13 0 0 0-4 17c3 5 8 7 13 6a14 14 0 0 0 6-5" fill="#fff" />
<path d="M147 63a17 17 0 0 0 3-2 18 18 0 0 0 5-17c-3 5-2 10-4 15a17 17 0 0 1-4 4" fill="#d4d4d4" />
<path d="m163 40-1-1-4 2a18 18 0 0 1 1 4c2 16-11 25-24 25 9 3 20 0 26-9v-1c4-9 3-11 2-20Z" fill="#d4d4d4" />
<path d="M197 62c-10 1-26-2-37-6-8-3-13-6-13-8s6-7 14-12a270 270 0 0 1 31-16c21-10 56-28 77-16s40 49 46 63a108 108 0 0 0-58-20c-31-1-49 6-59 14l-1 1Z" fill="#f1183c" />
<path d="M220 22c11-1 24 0 34-7a14 14 0 0 0 6-14c-21-4-50 10-68 19a270 270 0 0 0-31 16c-8 4-13 9-14 12 7 1 25-10 29-12 14-8 28-13 44-14Zm19 17a161 161 0 0 1-13 10 137 137 0 0 1 31-2 107 107 0 0 1 17 2c3-7 3-14 0-20-8-15-27 3-35 10" fill="#ff3153" />
<path d="M249 20c-10-3-26 4-34 10a120 120 0 0 0-25 32 37 37 0 0 0 7-1h1a55 55 0 0 1 15-8l4-3c10-5 20-10 27-18 4-4 6-9 5-12m20-16a33 33 0 0 0-16-4c16 5 29 20 26 38a18 18 0 0 1-6 11 107 107 0 0 1 42 18c-6-14-25-51-46-63" fill="#d61535" />
<path data-name="mittel" d="M140 227a97 97 0 0 1-16 20 37 37 0 0 1-4 3c4-3-31-53-37-48s32-19 59-17a28 28 0 0 0 11 17l-3 8a146 146 0 0 1-10 17" fill="var(--main-objekte-mittel)" />
<path data-name="hell" d="M135 187a11 11 0 0 0-4-2c-24 3-48 17-48 17 3-2 9 5 17 14a288 288 0 0 0 38-26 10 10 0 0 0-3-3m5 7a294 294 0 0 1-38 25l8 10c7-6 15-12 21-19 4-4 9-11 8-16" fill="var(--main-objekte-hell)" />
<path data-name="mittel" d="M178 131c-9 9-10 28 7 39a13 13 0 0 0 0 11 23 23 0 0 0-7 5c-3-7-14-25-29-19a12 12 0 0 0-6 7c-21-40 18-80 41-86 19-8 34-8 34-11l-33 29c1 10 1 16-7 25Z" fill="var(--main-objekte-mittel)" />
<path data-name="hell" d="M137 158c8 2 19-3 20-9 0-16 2-35 12-49a71 71 0 0 1 9-10c-20 9-45 37-41 68" fill="var(--main-objekte-hell)" />
<path data-name="dunkel" d="M178 109c-1 5-4 9-8 14l-6 12a83 83 0 0 1 6-7c6-7 7-13 8-19" fill="var(--main-objekte-dunkel)" />
<path data-name="dunkel" d="M178 131c8-9 8-15 7-25a11 11 0 0 1 1-3c-2-2-2-5-2-10l-1 11c0 8-2 15-6 21-4 7-10 12-12 18a36 36 0 0 0 1 6c2 4 4 8 2 12-1 4-5 5-9 5h-1c10 2 17 14 20 20a23 23 0 0 1 7-5 13 13 0 0 1 0-11c-17-11-16-30-7-39m193 35c8 8 24 13 23 17s-11 7-15 14-12 28-38 49h-1c-3-13-7-19-7-21a25 25 0 0 0 2-4c9-21 0-49-11-50 9-9 6-19 5-31-1-5 2-12 2-18a28 28 0 0 0 0-10c19 17 32 45 40 54" fill="var(--main-objekte-dunkel)" />
<path data-name="mehrdunkel" d="M351 183a65 65 0 0 1 0 12c0 3-1 7 3 6l4-3a26 26 0 0 0-2-15c-6-18-16-32-14-52v-2c-1 9-3 18-1 27 3 9 8 17 10 27" fill="var(--main-objekte-mehrdunkel)" />
<path data-name="mehrdunkel" d="M394 183a65 65 0 0 1-18 4c-6 1-10 7-15 12l-2 2c-2 3-5 7-9 6-3-1-3-5-3-8 1-12-1-22-6-33-3-7-5-14-4-22 0-11 4-21-4-31l-2-1a28 28 0 0 1 0 10c0 6-3 12-2 17 1 13 4 23-5 32 11 0 20 29 11 50a24 24 0 0 1-2 4c0 1 4 8 7 21h1c26-21 35-42 38-49s15-9 15-14" fill="var(--main-objekte-mehrdunkel)" />
<path d="M324 171c-12 0-40 19-67 25-19 5-42 1-55-2 2-6-4-13-12-14a9 9 0 0 0-5 1 13 13 0 0 1 0-11c-17-11-16-30-7-39s8-15 7-25a11 11 0 0 1 0-3c2-10 15-21 31-18h10c-8 5-13 47-8 44s11-7 17-5l41 6c5-1 12 3 17 7s8 3 11-10-2-27-4-32c6-1 23 4 28 10a17 17 0 0 1 3 7 28 28 0 0 1 0 10c0 6-3 13-2 17 1 13 4 23-5 32Z" fill="#f0f0f0" />
<path d="m199 161-7-12-3-13c0-3-4-4-6-3-3 3-5 4-6 8a24 24 0 0 0 0 11c2 8 6 14 13 17a7 7 0 0 0 9-2v-6m16 15a11 11 0 0 0-3-3 14 14 0 0 1-3-2 3 3 0 0 0-3 0 3 3 0 0 0-1 3c1 3 3 7 7 8a4 4 0 0 0 4-2 4 4 0 0 0-1-4m10-13-12-8c-8-4-11-7-13-16a2 2 0 0 0-3 0c-2 9 2 19 9 25 4 4 10 6 13 12 3 4 3 10 8 12a4 4 0 0 0 5-1c5-7-2-19-7-24" fill="#fff" />
<path d="M242 171c0-4-2-6-5-9-1-1-4 0-3 2 1 3 1 6 3 8s6 2 5-1" fill="#f7eedf" />
<path d="M195 118c1 8 4 16 12 17s13-4 16-10l-5 4c-5 3-11 3-14-9s5-30 12-35a25 25 0 0 0-3 0c-11 5-18 21-18 33m56 71c7-3 12-9 18-14a36 36 0 0 1 19-7c10-1 32 3 32-12 1-6-3-13-3-20 0-6 4-11 6-16l-7 11c-2 10 4 20 2 28-2 4-8 8-12 6-26-6-40 16-60 26a18 18 0 0 1-10 0c5 1 10 1 15-2" fill="#d4d4d4" />
<path d="M331 112a17 17 0 0 0-3-7c3 9-1 16-4 23-6 12 2 20 0 31-1 8-10 11-17 12l-23 1c-8 2-13 7-19 12-7 6-14 12-22 12a21 21 0 0 1-13-3 81 81 0 0 1-15-2c-4-1-6-2-9-5-2-3-4-7-8-9-4-1-10 0-14 2a16 16 0 0 0 1 2 10 10 0 0 1 5-1c8 1 14 8 12 14 13 3 36 7 55 2 27-6 55-25 67-25 9-9 6-19 5-31-1-5 2-12 2-18a28 28 0 0 0 0-10" fill="#d4d4d4" />
<path d="m349 316 1 1-10 2-6-36 13-3 2 36" fill="#a15132" />
<path d="m349 316 1 1-10 2-6-36 13-3 2 36" fill="#7a3d26" />
<path d="M167 288c-4 8-6 25-6 34a113 113 0 0 1-13-3 161 161 0 0 1 1-33l18 2" fill="#a15132" />
<path d="M167 288h-2a132 132 0 0 0-8 33l4 1c0-9 2-26 6-34" fill="#7a3d26" />
<path d="M212 291a24 24 0 0 0-2 8v29a327 327 0 0 1-39-4c0-10 1-25 6-35l34 2h1" fill="#a15132" />
<path d="M179 289h-2c-5 10-6 25-6 35l9 1a62 62 0 0 1-1-36m31 2c-5 11-5 24-5 37h5v-29a24 24 0 0 1 2-8h-2" fill="#7a3d26" />
<path d="M266 314h5c1 14-4 17-8 18h-32c-7 0-11-1-11-6a111 111 0 0 1 0-23c1-9 3-10 10-11h32c10 0 9 10 9 14a38 38 0 0 0-6 1c-3 1-3 7 1 7" fill="#a15132" />
<path d="M227 327c-6-16 0-29 13-35h-10c-7 1-9 2-10 11a111 111 0 0 0 0 23c0 5 4 6 11 6h1a18 18 0 0 1-5-5m44-13h-6a30 30 0 0 0 6 8 41 41 0 0 0 0-8" fill="#7a3d26" />
<path d="M327 322h-1a420 420 0 0 1-47 6v-14l5-1c3 0 3-7 0-7a39 39 0 0 0-5 0c1-10 0-15-2-18l44-3c2 6 5 18 6 37" fill="#a15132" />
<path d="M288 306c-3-5-3-1-5-6l-3-12h-3c1 3 2 8 2 18a39 39 0 0 1 5 0c3 0 3 7 0 7l-5 1v14l10-1a60 60 0 0 0 2-9l-3-12m38 16c0-19-3-31-5-37h-1a146 146 0 0 1 4 38l2-1" fill="#7a3d26" />
<path d="M143 174a19 19 0 0 0-1 9c-13-4-8-18 1-9" fill="#ffbd4d" />
<path d="M143 175a2 2 0 0 1-2-2c1-21-9-54-19-56-2 0-4 1-5 3-4 8 0 29 19 50a2 2 0 0 1-2 2c-22-22-25-45-21-54 2-3 6-5 9-5 15 2 24 38 23 60a2 2 0 0 1-2 2" fill="#f4b837" />
<path d="M130 186c-21 0-36-4-43-11a14 14 0 0 1-5-10 9 9 0 0 1 5-9c10-5 30 2 49 15a2 2 0 0 1-2 4c-19-14-38-19-45-15a5 5 0 0 0-3 5 10 10 0 0 0 4 7c7 7 25 10 50 9a2 2 0 0 1 0 4l-10 1" fill="#f4b837" />
<path d="M32 225a2 2 0 0 1-1-3c40-45 107-43 107-43a2 2 0 0 1 2 2 2 2 0 0 1-2 2s-65-2-105 42a2 2 0 0 1-1 0" fill="#f4b837" />
<path d="M143 174a12 12 0 0 1 6-7c15-6 26 12 29 19a53 53 0 0 0-9 15 35 35 0 0 0-3 7 34 34 0 0 1-13-6 28 28 0 0 1-11-17 19 19 0 0 1 1-11" fill="#ff3153" />
<path d="M177 186c-3 1-8 5-9 7a34 34 0 0 0-8 9 36 36 0 0 0-2 3 35 35 0 0 0 8 3 35 35 0 0 1 3-7 53 53 0 0 1 9-15" fill="#f1183c" />
<path d="M160 181c-3-4-11-9-17-8v1a19 19 0 0 0-1 11 28 28 0 0 0 8 15 13 13 0 0 0 10-4c5-4 4-10 0-15" fill="#ff6169" />
<path d="M166 212c-4 3-13 3-16-2l3-8a33 33 0 0 0 13 6 26 26 0 0 0 0 4" fill="#bf132f" />
<path d="M166 218h-1l-5 14c-8 2-19-4-20-5a146 146 0 0 0 9-17c4 5 13 5 16 2a28 28 0 0 0 1 6" fill="#d4d4d4" />
<path d="m165 218 1-1a27 27 0 0 1 0-5c-4 3-13 3-16-2 1 6 8 11 15 8" fill="#f0f0f0" />
<path d="M190 180c8 1 14 8 12 14l-8-2c-16 16-11 30-11 30l1 2c-4 5-11 6-15 1-2-1-3-4-3-7a28 28 0 0 1 0-6 27 27 0 0 1 0-4 35 35 0 0 1 3-7 53 53 0 0 1 9-15 23 23 0 0 1 7-5 10 10 0 0 1 5-1" fill="#f0f0f0" />
<path d="M201 194a10 10 0 0 0-1-3c-1-2-4-3-7-3l-6 4-3 8c-2 5-7 11-5 17a8 8 0 0 0 4 5c-1-2-4-15 11-30l7 2" fill="#d4d4d4" />
<path d="M174 213c1-5 4-10 6-14l3-6-3 4c-5 6-9 15-6 23a9 9 0 0 0 7 6h1a13 13 0 0 1-7-13" fill="#d4d4d4" />
<path d="M140 227c1 1 12 7 21 5a276 276 0 0 0-11 43c-9 10-19 7-26-27a97 97 0 0 0 16-21" fill="#d61535" />
<path d="M140 227a97 97 0 0 1-16 20l6 22c7-8 13-16 16-26a51 51 0 0 0 12-2l3-9c-9 2-20-4-21-5" fill="#bf132f" />
<path d="M324 171c11 0 20 29 11 50a24 24 0 0 1-2 4c-12 18-48 27-74 30a69 69 0 0 1-15 0c-22-3-46-16-60-31l-1-2s-5-14 11-30l8 2c13 3 36 7 55 2 27-6 55-25 67-25" fill="#ff3153" />
<path d="M209 206c7 2 22 7 29 3 4-3 7-6 9-11-16 1-34-2-45-4l-8-2a47 47 0 0 0-5 6 121 121 0 0 0 20 8m94-2c9-6 24-19 23-32a7 7 0 0 0-2-1c-12 0-40 19-67 25l-6 1c5 22 35 18 52 7" fill="#ff6169" />
<path d="M333 179c3 28-31 56-65 64-27 7-58 0-78-16-5-5-1-27 3-34-15 15-10 29-10 29l1 2c14 15 37 28 60 31a69 69 0 0 0 15 0c26-3 62-12 74-30a24 24 0 0 0 2-4c6-14 4-32-2-42" fill="#f1183c" />
<path d="m269 284-25-1v-28a69 69 0 0 0 15 0c26-3 62-12 74-30 0 2 4 8 7 21a257 257 0 0 1 6 34l-12 3a9 9 0 0 0-2-4c-4-3-14 0-14 0a35 35 0 0 1 3 6l-44 3c-2-3-5-4-8-4" fill="#f1183c" />
<path d="M323 247a80 80 0 0 0 13-14 67 67 0 0 0-3-8c-12 18-48 27-74 30a69 69 0 0 1-15 0v13c29 3 68-12 79-21" fill="#d61535" />
<path d="M338 238a83 83 0 0 1-14 13c-13 10-30 15-46 20h-1a149 149 0 0 0 64-22l-1-3-2-8" fill="#d61535" />
<path d="M169 226c4 4 11 3 15-2 14 15 37 28 60 31v28l-22 1c-5 0-8 2-10 7h-1l-34-2 1-1c0-1-7-6-10-2a12 12 0 0 0-1 2l-18-2 1-11a276 276 0 0 1 11-43c2-9 4-14 5-14 0 3 1 6 3 8" fill="#f1183c"/>
<path d="M199 268a83 83 0 0 1 3-12 24 24 0 0 0-4-5l-2-2a121 121 0 0 0-6 41h8a176 176 0 0 1 1-22m-6-21c-10-6-25-8-36-4a267 267 0 0 0-7 32l-1 11 17 2h1a12 12 0 0 1 1-2c3-3 10 1 10 2l-1 1 9 1a126 126 0 0 1 7-43" fill="#ff3153" />
<path d="M242 265h-2 2m2-10c-23-3-46-16-60-31-4 5-11 6-15 2-2-2-3-5-3-8s-2 3-3 8c2 9 11 14 21 13 12 16 28 27 56 30v14h4v-28" fill="#d61535" />
<path d="M171 324a327 327 0 0 0 39 4v3c0 7 5 10 18 10h19l1 14c-1 3-5 25-14 25-35-1-67-8-87-12l-21-6c6-27 22-43 22-43a113 113 0 0 0 13 3v6c2 3 10 1 10 1v-5" fill="#f1183c"/>
<path d="m161 370 2-9c2-10 7-20 11-30l3-6-6-1v5s-8 2-10-1v-6a112 112 0 0 1-13-3s-16 16-22 43l21 6 14 3m20-45-5 11c-4 10-8 19-10 29l-1 5 16 3c1-16 5-33 13-47l-13-1" fill="#ff3153" />
<path d="M247 341h-19c-13 0-18-3-18-10v-3h-2c-7 19 20 18 35 19a39 39 0 0 1-12 32l2 1c10 0 14-22 15-25l-1-14" fill="#d61535" />
<path d="M350 317c11 19 19 50 9 53l-29 4c-28 4-65 7-70 6-8-3-12-26-12-26v1l-1-14h23c3 0 9 0 9-7v-6a420 420 0 0 0 47-6h1v6s12 2 12-2a38 38 0 0 0 0-7h1l9-2h1" fill="#f1183c" />
<path d="M286 345a29 29 0 0 0 5-18l-12 1v6c0 7-6 7-9 7h-23l1 8c13 2 30 7 38-4" fill="#d61535" />
<path d="M330 374a127 127 0 0 0-2-16c-2-10-4-24-9-35l-7 1a150 150 0 0 1 11 51l7-1m20-57-10 2a38 38 0 0 1 0 7c-1 4-13 2-13 2v-6h-1l-3 1c5 11 7 24 9 34a134 134 0 0 1 2 17l25-4c10-3 2-34-9-53" fill="#e61739" />
<path d="M215 287a8 8 0 0 0-2 1 5 5 0 0 0-1 4 3 3 0 0 0 2 3 3 3 0 0 0 4-2 5 5 0 0 0 1-3v-1c0-2-2-3-4-2m67 21c-1-2-3-1-5-1a39 39 0 0 0-6 0c-2 1-1 3 0 3a24 24 0 0 0 7 0c1 0 4 0 4-2m-11-16h-2v1a2 2 0 0 0 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0-2m-54 41a11 11 0 0 0-1-1 5 5 0 0 1-2-1 1 1 0 0 0-1 1 3 3 0 0 0 3 4c1 0 2-2 1-3" fill="#fbf4a3" />
<path d="M237 308c-5 0-5 7 0 7s5-8 0-7m-47-2c-4 0-4 7 0 7s5-7 0-7m119-1a3 3 0 0 0-2-2 3 3 0 0 0-4 2 3 3 0 0 0 5 4 3 3 0 0 0 1-4" fill="#7a3d26" />
<image width="400" height="530" transform="matrix(0.23, 0.03, -0.03, 0.23, 220.68, 59.26)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAEJCAMAAADmRZgJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRF2NjY2dnZ7e3t4eHh3t7e7Ozs3Nzc5OTk6+vr2tra5eXl29vb4ODg5+fn6enp4uLi39/f6urq3d3d7u7u6Ojo4+Pj5ubm7u7u++UpuAAAABh0Uk5T//////////////////////////////8AzRMu6gAABetJREFUeNr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rflGYdODWh8fVbS5csFXfL9NzYbQ/rjdEBzYpPxdOOrC2/1wBiuQPiUHzA+kcGCIPCPnb234vLqa+b/y7ShqJn9v/LvemPgH/v25dkd6lDC7Ap923BiUJaPetYZEIyvOWUMNCKoQ3ji+FVChfuf5a2obuoeSt2BDd+gpv5Z/IDvePglxU7/j+KJFGdXX/LFpHcwb+UkaQZsWhb4UdKTbJ11KbFJvke/FTek0yUo6W3MQ1WiCY2of50ZLNxMoOTRTRpnXAmihrTqq47mSheQzpjPcWpyB0xruH05CGyAkrUTMQKut7hnMQGp3Lw3kIhZnrbcYagSjrT70ixyUQbG0fJhqXQWw/v6e4FGL3R+0vA2QUIi3+++jL5n0OYvNWJcM1EMwFoYE+BbH1G2qBayF2rvAprofYOAmXcgvEvq8q/rhjEmKbZMoxDbFLMumYgdj0/zbTjjmIPSM+nXbMQrC3Y2X0ZhzzEGxt2K10s685D8Hq+oNWjCYgGF68FxYZmoGguvQYn+RoCoLywoKcQYXmIBcuKHWIRiEYXzMNlxINQzC7QuI1aByCeWLh8rEFgmFg3/KxCYLKt2752AZBmdq2fGyEnHhCWbh8bIac9U1i6fKxHXLONLx4+dgBOWMaXr587IEcvxvWG15qC+TgySvK8CzI7Sh/3ECpKzwRgvlRq3wh8VQIqkOOKEm29X02Q27zsPnZy1N4AcR4owTtjpfZA7mNFIO7SNFJvAyC2Jsa9Gm470X2QlBqE0OlzPe+x27InbKzVcR+hhHIjdLv2LREXmXiHYxAEJs23faJuI6VmTcwBLlPxrG/dt+SFHlj6vHmIPdtcVwubhcRFK00+GyjkHu7ZEU92zAiSeNKmn2wacgD0+q0jsSIoSx604ijII/RL8M27rzU94NHar/0Cp3lSh70wH8CDADyhUiNEH7C5gAAAABJRU5ErkJggg=="/>
<path d="M301 92c-7-8-13-17-39-19-28-2-36 8-44 19s-24-28-19-33c10-10 35-18 59-16 42 3 71 24 66 36s-19 19-23 13Z" fill="#f0f0f0" />
<g mask="url(#a)">
<path d="M197 83c3-9 12-17 22-19a32 32 0 0 1 5-1c-7-1-13-1-18 3-7 3-9 10-9 17Z" fill="#fff" />
</g>
<g mask="url(#b)">
<path d="M257 47c-31-1-49 6-59 14h-1v1a40 40 0 0 0-4 4c-5 5-8 14-9 22-1 6 0 12 2 15 0-5 4-9 8-13-2-13 0-25 14-30 7-2 14-1 21 0 12 2 21-5 32-7 9-2 17 0 25 4l17 8 14 4h1l-3-2a108 108 0 0 0-58-20Z" fill="#fff" />
</g>
<g mask="url(#c)">
<path d="M241 64a88 88 0 0 0 14-2c11-2 20-1 30 3l20 5c-15-5-27-16-44-13-7 1-13 5-20 7Z" fill="#fff" />
</g>
<g mask="url(#c)">
<path d="M300 87c8 1 15-3 18-12 1-3-1-5-3-8l-1-1c2 7 0 11-5 16-5 3-11 3-16 2l-38-8c-14-3-29-4-43 0a35 35 0 0 0-12 4c15-8 35-6 52-4 16 2 32 8 48 11Z" fill="#d4d4d4" />
</g>
<g mask="url(#d)">
<path d="M320 71c3 11-7 21-21 18l-23-4c-12-3-24-5-37-6-16-1-33-1-44 10 5-3 69-11 113 9q15 1 20 7c3-4 6-16 0-25a43 43 0 0 0-8-9Z" fill="#d4d4d4" />
</g>
</svg>
</div>
The used custom function svg2Png() is just a simplyfied example code and might not be appropriate to provide the best legacy browser support.
Thus consider posting a issue report on github for 'html2canvas' (or other used libraries).

Related

Generating and plotting an event window relative to a shock (Repost)

Repost from: https://www.statalist.org/forums/forum/general-stata-discussion/general/1648042-generating-and-plotting-of-an-event-window-relative-to-a-shock
Dear all,
I am (still) struggling with the generation of event_window variable (relative to the time of the event). The esplot package (#Dylan Balla-Elliott) defines event_windowas follows.
event_indicator = <current_time> == <time of event>
event_time = <current_time> - <time of event>
Here is a data example, with a time variable, a continuous variable, and a set of event indicator dummies (which are basically random shocks).
* Example generated by -dataex-. For more info, type help dataex
clear
input str7 modate float epeu_lvl byte(cop_shock unpri_reg_shock eu_reg_shock) float tid
"2004/1" 75.34063 0 0 0 1
"2004/2" 76.99823 0 0 0 2
"2004/3" 125.02164 0 0 0 3
"2004/4" 109.83804 0 0 0 4
"2004/5" 114.84982 0 0 0 5
"2004/6" 99.84531 0 0 0 6
"2004/7" 115.9254 0 0 0 7
"2004/8" 77.3424 0 0 0 8
"2004/9" 89.59677 0 0 0 9
"2004/10" 120.00146 0 0 0 10
"2004/11" 127.93832 0 0 0 11
"2004/12" 83.33497 1 0 1 12
"2005/1" 58.94662 0 0 0 13
"2005/2" 74.97708 0 0 0 14
"2005/3" 81.45479 0 0 0 15
"2005/4" 89.07868 0 0 0 16
"2005/5" 99.44091 0 0 0 17
"2005/6" 99.41497 0 0 0 18
"2005/7" 85.08384 0 0 0 19
"2005/8" 82.83349 0 0 0 20
"2005/9" 160.47383 0 0 0 21
"2005/10" 71.51886 0 0 0 22
"2005/11" 95.44765 0 0 0 23
"2005/12" 61.47662 1 0 1 24
"2006/1" 83.96114 0 0 0 25
"2006/2" 60.63415 0 0 0 26
"2006/3" 79.82993 0 0 0 27
"2006/4" 89.04356 0 0 0 28
"2006/5" 82.44514 0 0 0 29
"2006/6" 89.85152 0 0 0 30
"2006/7" 82.00437 0 0 0 31
"2006/8" 58.86663 0 0 0 32
"2006/9" 76.82971 0 0 0 33
"2006/10" 71.2218 0 0 0 34
"2006/11" 73.84509 1 0 0 35
"2006/12" 74.91799 0 0 0 36
"2007/1" 62.33881 0 0 0 37
"2007/2" 58.51786 0 0 0 38
"2007/3" 71.11645 0 0 0 39
"2007/4" 65.16531 0 0 0 40
"2007/5" 54.99327 0 0 0 41
"2007/6" 60.84606 0 0 0 42
"2007/7" 47.69234 0 0 0 43
"2007/8" 94.66286 0 0 0 44
"2007/9" 166.7332 0 0 0 45
"2007/10" 96.88046 0 0 0 46
"2007/11" 97.73734 0 0 0 47
"2007/12" 98.01473 1 0 1 48
"2008/1" 160.25905 0 0 1 49
"2008/2" 128.78455 0 0 0 50
"2008/3" 139.87073 0 0 0 51
"2008/4" 96.74758 0 0 0 52
"2008/5" 76.82344 0 0 0 53
"2008/6" 106.42784 0 0 0 54
"2008/7" 87.93302 0 0 0 55
"2008/8" 92.29639 0 0 0 56
"2008/9" 156.0435 0 0 0 57
"2008/10" 216.5918 0 0 0 58
"2008/11" 156.77446 1 0 0 59
"2008/12" 136.78456 0 0 0 60
"2009/1" 159.99384 0 0 0 61
"2009/2" 139.69698 0 0 0 62
"2009/3" 133.46071 0 0 0 63
"2009/4" 119.9992 0 0 1 64
"2009/5" 122.9601 0 0 0 65
"2009/6" 113.23891 0 0 0 66
"2009/7" 95.94823 0 0 0 67
"2009/8" 91.37744 0 0 0 68
"2009/9" 104.3236 0 0 0 69
"2009/10" 105.04014 0 0 0 70
"2009/11" 133.00749 1 0 1 71
"2009/12" 115.2626 0 0 1 72
"2010/1" 142.00356 0 0 0 73
"2010/2" 136.73906 0 0 0 74
"2010/3" 137.8383 0 0 0 75
"2010/4" 152.78447 0 0 0 76
"2010/5" 203.30525 0 0 0 77
"2010/6" 171.40266 0 0 1 78
"2010/7" 186.55524 0 0 0 79
"2010/8" 172.81606 0 0 0 80
"2010/9" 161.69014 0 0 0 81
"2010/10" 186.1411 0 1 0 82
"2010/11" 172.68817 1 0 0 83
"2010/12" 183.076 0 0 0 84
"2011/1" 143.03174 0 0 0 85
"2011/2" 122.44579 0 0 0 86
"2011/3" 154.4015 0 0 0 87
"2011/4" 145.5086 0 0 0 88
"2011/5" 134.21507 0 0 1 89
"2011/6" 168.2959 0 0 0 90
"2011/7" 183.40234 0 0 0 91
"2011/8" 230.29893 0 0 0 92
"2011/9" 280.05814 0 0 0 93
"2011/10" 241.75185 0 0 0 94
"2011/11" 304.60022 1 0 0 95
"2011/12" 228.8716 0 0 0 96
"2012/1" 216.73445 0 0 0 97
"2012/2" 193.44435 0 0 0 98
"2012/3" 177.4927 0 0 0 99
"2012/4" 216.99586 0 0 0 100
end
At glance I thought to create a loop that generates event_window. But some questions arise about how to handle the variable with two sequential shocks (i.e in 2009/11 and 2009/12 for eu_reg_shock). Or where two or more shocks are included in the time window. If the window is too large, it will be problematic, I assume.
My main goal is to analyze if these shocks affect the continuous variable before and after. Ideally, I need to normalize the continuous variable (with mean of one) before the shock. Here is the study and the plot that I wish to replicate from Scott R. Baker Nicholas Bloom Stephen J. Terry (2022).
I thought about the following plot. But I have no idea about the normalization part.
graph bar (mean) epeu_lvl, over(event_time)
References:
Scott R. Baker Nicholas Bloom Stephen J. Terry (2022). https://www.nber.org/papers/w27167
Dylan Balla-Elliott. https://dballaelliott.github.io/esplot/index.html

AWK Formatting Using First Row as a Header and Iterating by column

I'm struggling trying to format a collectd ploted file si I can later import it to an influx db instance.
This is how the file looks like:
#Date Time [CPU]User% [CPU]Nice% [CPU]Sys% [CPU]Wait% [CPU]Irq% [CPU]Soft% [CPU]Steal% [CPU]Idle% [CPU]Totl% [CPU]Intrpt/sec [CPU]Ctx/sec [CPU]Proc/sec [CPU]ProcQue [CPU]ProcRun [CPU]L-Avg1 [CPU]L-Avg5 [CPU]L-Avg15 [CPU]RunTot [CPU]BlkTot [MEM]Tot [MEM]Used [MEM]Free [MEM]Shared [MEM]Buf [MEM]Cached [MEM]Slab [MEM]Map [MEM]Anon [MEM]Commit [MEM]Locked [MEM]SwapTot [MEM]SwapUsed [MEM]SwapFree [MEM]SwapIn [MEM]SwapOut [MEM]Dirty [MEM]Clean [MEM]Laundry [MEM]Inactive [MEM]PageIn [MEM]PageOut [MEM]PageFaults [MEM]PageMajFaults [MEM]HugeTotal [MEM]HugeFree [MEM]HugeRsvd [MEM]SUnreclaim [SOCK]Used [SOCK]Tcp [SOCK]Orph [SOCK]Tw [SOCK]Alloc [SOCK]Mem [SOCK]Udp [SOCK]Raw [SOCK]Frag [SOCK]FragMem [NET]RxPktTot [NET]TxPktTot [NET]RxKBTot [NET]TxKBTot [NET]RxCmpTot [NET]RxMltTot [NET]TxCmpTot [NET]RxErrsTot [NET]TxErrsTot [DSK]ReadTot [DSK]WriteTot [DSK]OpsTot [DSK]ReadKBTot [DSK]WriteKBTot [DSK]KbTot [DSK]ReadMrgTot [DSK]WriteMrgTot [DSK]MrgTot [INODE]NumDentry [INODE]openFiles [INODE]MaxFile% [INODE]used [NFS]ReadsS [NFS]WritesS [NFS]MetaS [NFS]CommitS [NFS]Udp [NFS]Tcp [NFS]TcpConn [NFS]BadAuth [NFS]BadClient [NFS]ReadsC [NFS]WritesC [NFS]MetaC [NFS]CommitC [NFS]Retrans [NFS]AuthRef [TCP]IpErr [TCP]TcpErr [TCP]UdpErr [TCP]IcmpErr [TCP]Loss [TCP]FTrans [BUD]1Page [BUD]2Pages [BUD]4Pages [BUD]8Pages [BUD]16Pages [BUD]32Pages [BUD]64Pages [BUD]128Pages [BUD]256Pages [BUD]512Pages [BUD]1024Pages
20190228 00:01:00 12 0 3 0 0 1 0 84 16 26957 20219 14 2991 3 0.05 0.18 0.13 1 0 198339428 197144012 1195416 0 817844 34053472 1960600 76668 158641184 201414800 0 17825788 0 17825788 0 0 224 0 0 19111168 3 110 4088 0 0 0 0 94716 2885 44 0 5 1982 1808 0 0 0 0 9739 9767 30385 17320 0 0 0 0 0 0 12 13 3 110 113 0 16 16 635592 7488 0 476716 0 0 0 0 0 0 0 0 0 0 0 8 0 0 22 0 1 0 0 0 0 48963 10707 10980 1226 496 282 142 43 19 6 132
20190228 00:02:00 11 0 3 0 0 1 0 85 15 26062 18226 5 2988 3 0.02 0.14 0.12 2 0 198339428 197138128 1201300 0 817856 34054692 1960244 75468 158636064 201398036 0 17825788 0 17825788 0 0 220 0 0 19111524 0 81 960 0 0 0 0 94420 2867 42 0 7 1973 1842 0 0 0 0 9391 9405 28934 16605 0 0 0 0 0 0 9 9 0 81 81 0 11 11 635446 7232 0 476576 0 0 0 0 0 0 0 0 0 0 0 3 0 0 8 0 1 0 0 0 0 49798 10849 10995 1241 499 282 142 43 19 6 132
20190228 00:03:00 11 0 3 0 0 1 0 85 15 25750 17963 4 2980 0 0.00 0.11 0.10 2 0 198339428 197137468 1201960 0 817856 34056400 1960312 75468 158633880 201397832 0 17825788 0 17825788 0 0 320 0 0 19111712 0 75 668 0 0 0 0 94488 2869 42 0 5 1975 1916 0 0 0 0 9230 9242 28411 16243 0 0 0 0 0 0 9 9 0 75 75 0 10 10 635434 7232 0 476564 0 0 0 0 0 0 0 0 0 0 0 2 0 0 6 0 1 0 0 0 0 50029 10817 10998 1243 501 282 142 43 19 6 132
20190228 00:04:00 11 0 3 0 0 1 0 84 16 25755 17871 10 2981 5 0.08 0.11 0.10 3 0 198339428 197140864 1198564 0 817856 34058072 1960320 75468 158634508 201398088 0 17825788 0 17825788 0 0 232 0 0 19111980 0 79 2740 0 0 0 0 94488 2867 4 0 2 1973 1899 0 0 0 0 9191 9197 28247 16183 0 0 0 0 0 0 9 9 0 79 79 0 10 10 635433 7264 0 476563 0 0 0 0 0 0 0 0 0 0 0 5 0 0 12 0 1 0 0 0 0 49243 10842 10985 1245 501 282 142 43 19 6 132
20190228 00:05:00 12 0 4 0 0 1 0 83 17 26243 18319 76 2985 3 0.06 0.10 0.09 2 0 198339428 197148040 1191388 0 817856 34059808 1961420 75492 158637636 201405208 0 17825788 0 17825788 0 0 252 0 0 19112012 0 85 18686 0 0 0 0 95556 2884 43 0 6 1984 1945 0 0 0 0 9176 9173 28153 16029 0 0 0 0 0 0 10 10 0 85 85 0 12 12 635473 7328 0 476603 0 0 0 0 0 0 0 0 0 0 0 3 0 0 7 0 1 0 0 0 0 47625 10801 10979 1253 505 282 142 43 19 6 132
What I'm trying to do, is to get it in a format that looks like this:
cpu_value,host=mxspacr1,instance=5,type=cpu,type_instance=softirq value=180599 1551128614916131663
cpu_value,host=mxspacr1,instance=2,type=cpu,type_instance=interrupt value=752 1551128614916112943
cpu_value,host=mxspacr1,instance=4,type=cpu,type_instance=softirq value=205697 1551128614916128446
cpu_value,host=mxspacr1,instance=7,type=cpu,type_instance=nice value=19250943 1551128614916111618
cpu_value,host=mxspacr1,instance=2,type=cpu,type_instance=softirq value=160513 1551128614916127690
cpu_value,host=mxspacr1,instance=1,type=cpu,type_instance=softirq value=178677 1551128614916127265
cpu_value,host=mxspacr1,instance=0,type=cpu,type_instance=softirq value=212274 1551128614916126586
cpu_value,host=mxspacr1,instance=6,type=cpu,type_instance=interrupt value=673 1551128614916116661
cpu_value,host=mxspacr1,instance=4,type=cpu,type_instance=interrupt value=701 1551128614916115893
cpu_value,host=mxspacr1,instance=3,type=cpu,type_instance=interrupt value=723 1551128614916115492
cpu_value,host=mxspacr1,instance=1,type=cpu,type_instance=interrupt value=756 1551128614916112550
cpu_value,host=mxspacr1,instance=6,type=cpu,type_instance=nice value=21661921 1551128614916111032
cpu_value,host=mxspacr1,instance=3,type=cpu,type_instance=nice value=18494760 1551128614916098304
cpu_value,host=mxspacr1,instance=0,type=cpu,type_instance=interrupt value=552 1551
What I have managed to do so far is just to convert the date string into EPOCH format.
I was thinking somehow to use the first value "[CPU]" as the measurement, and the "User%" as the type, the host I can take it from the system where the script will run.
I would really appreciate your help, because I really basic knowledge of text editing.
Thanks.
EDIT: this is what would expect to get with the information of the second line using as a header the first row:
cpu_value,host=mxspacr1,type=cpu,type_instance=user% value=0 1551128614916131663
EDIT: This is what I have so far, and I'm stuck here.
awk -v HOSTNAME="$HOSTNAME" 'BEGIN { FS="[][]"; getline; NR==1; f1=$2; f2=$3 } { RS=" "; printf f1"_measurement,host="HOSTNAME",type="f2"value="$3" ", system("date +%s -d \""$1" "$2"\"") }' mxmcaim01-20190228.tab
And this is what I get, but this is only for 1 column, now I don't know how to process the remaining columns such as Nice, Sys, Wait and so on.
CPU_measurement,host=mxmcamon05,type=User% value= 1552014000
CPU_measurement,host=mxmcamon05,type=User% value= 1551960000
CPU_measurement,host=mxmcamon05,type=User% value= 1551343500
CPU_measurement,host=mxmcamon05,type=User% value= 1551997620
CPU_measurement,host=mxmcamon05,type=User% value= 1551985200
CPU_measurement,host=mxmcamon05,type=User% value= 1551938400
CPU_measurement,host=mxmcamon05,type=User% value= 1551949200
CPU_measurement,host=mxmcamon05,type=User% value= 1551938400
CPU_measurement,host=mxmcamon05,type=User% value= 1551938400
CPU_measurement,host=mxmcamon05,type=User% value= 1551945600
CPU_measurement,host=mxmcamon05,type=User% value= 1551938400
Please help.
EDIT. First of all, Thanks for your help.
Taking Advantage from you knowledge in text editing, I was expecting to use this for 3 separate files, but unfortunately and I don't know why the format is different, like this:
#Date Time SlabName ObjInUse ObjInUseB ObjAll ObjAllB SlabInUse SlabInUseB SlabAll SlabAllB SlabChg SlabPct
20190228 00:01:00 nfsd_drc 0 0 0 0 0 0 0 0 0 0
20190228 00:01:00 nfsd4_delegations 0 0 0 0 0 0 0 0 0 0
20190228 00:01:00 nfsd4_stateids 0 0 0 0 0 0 0 0 0 0
20190228 00:01:00 nfsd4_files 0 0 0 0 0 0 0 0 0 0
20190228 00:01:00 nfsd4_stateowners 0 0 0 0 0 0 0 0 0 0
20190228 00:01:00 nfs_direct_cache 0 0 0 0 0 0 0 0 0 0
So I don't how to handle the arrays in a way that I can use nfsd_drc as the type and then Iterate through ObjInUse ObjInUseB ObjAll ObjAllB SlabInUse SlabInUseB SlabAll SlabAllB SlabChg SlabPct and use them like the type_instance and finally the value in this case for ObjInUse will be 0, ObjInUseB = 0, ObjAll = 0, an so one, making something like this:
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=ObjectInUse value=0 1551128614916131663
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=ObjInuseB value=0 1551128614916131663
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=ObjAll value=0 1551128614916112943
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=ObjAllB value=0 1551128614916128446
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabInUse value=0 1551128614916111618
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabInUseB value=0 1551128614916127690
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabAll value=0 1551128614916127265
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabAllB value=0 1551128614916126586
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabChg value=0 1551128614916116661
slab_value,host=mxspacr1,type=nfsd_drc,type_instance=SlabPct value=0 1551128614916115893
slab_value is a hard-coded value.
Thanks.
It is not clear where do instance and type_instance=interrupt come from in your final desired format. Otherwise awk code below should work.
Note: it doesn't strip % from tag values and prints timestamp at end of line in seconds (append extra zeros if you want nanoseconds).
gawk -v HOSTNAME="$HOSTNAME" 'NR==1 {split($0,h,/[ \t\[\]]+/,s); for(i=0;i<length(h);i++){ h[i]=tolower(h[i]); };}; NR>1 { for(j=2;j<NF;j++) {k=2*j; printf("%s_value,host=%s,type=%s,type_instance=%s value=%s %s\n", h[k], HOSTNAME, h[k], h[k+1],$(j+1), mktime(substr($1,1,4)" "substr($1,5,2)" "substr($1,7,2)" "substr($2,1,2)" "substr($2,4,2)" "substr($2,7,2)));}}' mxmcaim01-20190228.tab

Extract column from file with shell [duplicate]

This question already has answers here:
bash: shortest way to get n-th column of output
(8 answers)
Closed 4 years ago.
I would like to extract column number 8 from the following table using shell (ash):
0xd024 2 0 32 20 3 0 1 0 2 1384 1692 -61 27694088
0xd028 0 1 5 11 1 0 46 0 0 301 187 -74 27689154
0xd02c 0 0 35 14 1 0 21 0 0 257 250 -80 27689410
0xd030 1 1 15 13 1 0 38 0 0 176 106 -91 27689666
0xd034 1 1 50 20 1 0 8 0 0 790 283 -71 27689980
0xd038 0 0 0 3 4 0 89 0 0 1633 390 -90 27690291
0xd03c 0 0 8 3 3 0 82 0 0 1837 184 -95 27690603
0xd040 0 0 4 5 1 0 90 0 0 0 148 -97 27690915
0xd064 0 0 36 9 1 0 29 0 0 321 111 -74 27691227
0xd068 0 0 5 14 14 0 40 0 0 8066 2270 -85 27691539
0xd06c 1 1 39 19 1 0 15 0 0 1342 261 -74 27691850
0xd070 0 0 12 11 1 0 53 0 0 203 174 -73 27692162
0xd074 0 0 18 2 1 0 75 0 0 301 277 -94 27692474
How can I do that?
the following command "awk '{print $8}' file" works fine

R plotting boxplot with different amount of entries

I have a matrix that is 50x2. But column 2 has different amount of entries. How can I make a box plot where the x axis is position and the y axis are the different counts? Ideally, I'd like to take the absolute value of the counts. Thanks in advance!
> mat.count[1:50,]
position count
1 136873135 0
2 136873136 0
3 136873137 0
4 136873138 0
5 136873139 0
6 136873140 -15
7 136873141 0
8 136873142 0
9 136873143 0
10 136873144 0
11 136873145 0
12 136873146 0
13 136873147 0
14 136873148 0
15 136873149 0
16 136873150 0
17 136873151 0
18 136873152 0
19 136873153 0
20 136873154 0
21 136873155 0
22 136873156 0
23 136873157 0
24 136873158 0
25 136873159 0
26 136873160 0
27 136873161 0
28 136873162 0
29 136873163 0
30 136873164 0
31 136873165 0
32 136873166 0
33 136873167 0
34 136873168 -1
35 136873169 0
36 136873170 0
37 136873171 0
38 136873172 0
39 136873173 -70
40 136873174 -66
41 136873175 -73,-1,-1,-1,-73,-1
42 136873176 -52
43 136873177 0
44 136873178 0
45 136873179 -66,-1
46 136873180 -1
47 136873181 0
48 136873182 -68,-75
49 136873183 -67,-67
50 136873184 -60,-56,-56

Average process speed is getting slower

I'm not good at English. So I ask for your patience and editing.
I have analysed census data of South Korea. I used 'adaboost' as a analysis method and adaboost was implemented for each cities. Target variable, independent variables, formula, options, the number of observation, etc, everything is same among cities. There is no difference. And I made a macro that implements adaboost for the cities one by one. The macro removes all objects except for itself before it starts to analyse the next city.
And I found that average process speed is getting slower as time goes on. I mean that the average time needed for cities 1-30 was around 10 minutes, but it became 25 minutes for the cities 80-100. So I terminated the R session and re-opened. I re-ran the macro from 80th city, then the average time for cities 80-100 was reduced to 10 minutes.
Why does this happen? How can I solve this problem? I need your help. Thanks in advance.
The r code and macro are as below. 'sgg' macro variable indicates city codes. Target variable has six categories. So I used 'one-others' method for multi-class classification.
memory.limit(size=4095)
library(gbm)
library(gtools)
dbset<-strmacro(sgg,sampnum,
expr=
{
setwd("C:\\Users\\Kim\\Desktop\\JQ\\");
db.sgg<-read.table('sgg.TXT', header=TRUE);
db.sgg<-subset(db.sgg, AGE>=10)
N<-nrow(db.sgg);
if(N>=sampnum)
{
db.sgg<-db.sgg[sample(1:N, sampnum),]
};
db.sgg$SEX<-factor(letters[db.sgg$SEX])
ordered(db.sgg$AREA);
db.sgg$josagu_attri_mod2<-factor(letters[db.sgg$josagu_attri_mod])
db.sgg$geocheo_type_mod2<-factor(letters[db.sgg$geocheo_type_mod])
db.sgg$dandok_type_mod2<-factor(letters[db.sgg$dandok_type_mod])
colnames(db.sgg)[10:15]<-c('FLC3.1','FLC3.3','FLC3.4','FLC3.5','FLC3.6','FLC3.7');
}
);
train<-strmacro(i, sgg,
expr={
res.sgg.i<-gbm(FLC3.i~SEX+AREA+AGE+josagu_attri_mod2+geocheo_type_mod2+dandok_type_mod2,
data=db.sgg, distribution='adaboost', n.trees=3000,shrinkage = 0.005,
cv.folds=5, keep.data=TRUE,
bag.fraction=0.7, interaction.depth=3);
BI.sgg.i<-gbm.perf(res.sgg.i, method='cv');
PRED.sgg.i<-predict.gbm(res.sgg.i, db.sgg, BI.sgg.i);
}
);
clean<-strmacro(sgg,
expr={
rm(BI.sgg.1);rm(BI.sgg.3);rm(BI.sgg.4);rm(BI.sgg.5);rm(BI.sgg.6);rm(BI.sgg.7);
rm(res.sgg.1);rm(res.sgg.3);rm(res.sgg.4);rm(res.sgg.5);rm(res.sgg.6);rm(res.sgg.7);
rm(PRED.sgg.1);rm(PRED.sgg.3);rm(PRED.sgg.4);rm(PRED.sgg.5);rm(PRED.sgg.6);rm(PRED.sgg.7);
rm(db.sgg);
}
);
all<-strmacro(sgg,num,
expr={
dbset(sgg,num);
train(1,sgg);train(3,sgg);train(4,sgg);train(5,sgg);train(6,sgg);train(7,sgg);
clean(sgg);
}
);
all(11010,3000)
all(11020,3000)
all(11030,3000)
Data is as below. This data is stored in '11010.txt'.
C3 mem_num josagu_attri_mod SEX AGE geocheo_type_mod dandok_type_mod C97 FLC3 FLC3_1 FLC3_3 FLC3_4 FLC_4 FLC3_6 FLC3_7 AREA
1 3 3 1 14 1 1 49 3 0 0 1 0 0 0 2
1 1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 3 1 41 1 1 91 5 0 0 0 0 1 0 3
72 2 2 2 71 1 1 91 5 0 0 0 0 1 0 3
73 1 1 1 60 1 1 91 5 0 0 0 0 1 0 3
73 3 3 1 27 1 1 91 5 0 0 0 0 1 0 3
73 2 2 2 57 1 1 91 5 0 0 0 0 1 0 3
74 1 1 1 61 2 1 119 5 0 0 0 0 1 0 4
74 4 3 1 30 2 1 119 5 0 0 0 0 1 0 4
74 2 2 2 56 2 1 119 5 0 0 0 0 1 0 4
74 3 3 2 32 2 1 119 5 0 0 0 0 1 0 4
75 2 2 1 72 1 1 99 6 0 0 0 0 0 1 3
75 1 1 2 71 1 1 99 6 0 0 0 0 0 1 3
78 1 1 2 28 1 4 15 1 1 0 0 0 0 0 1
80 1 1 1 68 1 1 92 6 0 0 0 0 0 1 3
80 2 2 2 66 1 1 92 6 0 0 0 0 0 1 3
81 2 3 1 27 1 6 46 5 0 0 0 0 1 0 2
81 3 3 1 29 1 6 46 5 0 0 0 0 1 0 2
81 1 1 2 57 1 6 46 5 0 0 0 0 1 0 2
83 1 1 1 30 1 4 43 2 0 1 0 0 0 0 2
83 2 2 2 30 1 4 43 2 0 1 0 0 0 0 2
84 1 1 2 64 1 4 33 6 0 0 0 0 0 1 2
85 1 1 1 35 1 6 26 2 0 1 0 0 0 0 1
85 2 2 2 33 1 6 26 2 0 1 0 0 0 0 1
88 1 1 1 52 2 1 145 5 0 0 0 0 1 0 5
88 2 2 2 49 2 1 145 5 0 0 0 0 1 0 5
88 3 3 2 25 2 1 145 5 0 0 0 0 1 0 5
89 2 3 1 13 2 1 145 4 0 0 0 1 0 0 5
89 3 3 1 22 2 1 145 4 0 0 0 1 0 0 5
89 1 1 2 47 2 1 145 4 0 0 0 1 0 0 5
90 1 1 1 57 2 1 83 5 0 0 0 0 1 0 3
90 3 3 1 25 2 1 83 5 0 0 0 0 1 0 3
90 4 3 1 23 2 1 83 5 0 0 0 0 1 0 3
90 2 2 2 52 2 1 83 5 0 0 0 0 1 0 3
91 1 1 1 33 2 4 83 2 0 1 0 0 0 0 3
91 2 2 2 32 2 4 83 2 0 1 0 0 0 0 3
92 1 1 1 35 2 1 83 3 0 0 1 0 0 0 3
92 2 2 2 34 2 1 83 3 0 0 1 0 0 0 3
93 1 1 1 35 2 4 83 2 0 1 0 0 0 0 3
93 2 2 2 35 2 4 83 2 0 1 0 0 0 0 3
94 1 1 1 55 2 4 83 5 0 0 0 0 1 0 3
94 2 2 2 53 2 4 83 5 0 0 0 0 1 0 3
94 3 3 2 27 2 4 83 5 0 0 0 0 1 0 3
94 4 3 2 24 2 4 83 5 0 0 0 0 1 0 3
95 1 1 1 49 2 1 83 4 0 0 0 1 0 0 3
95 2 3 1 21 2 1 83 4 0 0 0 1 0 0 3
95 3 3 2 15 2 1 83 4 0 0 0 1 0 0 3
96 1 1 1 35 2 1 83 1 1 0 0 0 0 0 3
96 2 2 2 35 2 1 83 1 1 0 0 0 0 0 3
97 1 1 1 54 2 1 83 4 0 0 0 1 0 0 3
97 4 3 1 13 2 1 83 4 0 0 0 1 0 0 3
97 2 2 2 51 2 1 83 4 0 0 0 1 0 0 3
97 3 3 2 21 2 1 83 4 0 0 0 1 0 0 3
98 1 1 1 49 4 1 85 4 0 0 0 1 0 0 3
98 2 2 2 42 4 1 85 4 0 0 0 1 0 0 3
98 3 3 2 20 4 1 85 4 0 0 0 1 0 0 3
98 4 3 2 17 4 1 85 4 0 0 0 1 0 0 3
99 1 1 1 69 4 1 96 6 0 0 0 0 0 1 3
99 2 2 2 66 4 1 96 6 0 0 0 0 0 1 3
100 1 1 1 69 4 1 96 6 0 0 0 0 0 1 3
100 2 2 2 60 4 1 96 6 0 0 0 0 0 1 3
101 1 1 1 32 4 4 33 1 1 0 0 0 0 0 2
101 2 2 2 32 4 4 33 1 1 0 0 0 0 0 2
103 1 1 1 39 1 6 27 4 0 0 0 1 0 0 1
103 2 2 2 34 1 6 27 4 0 0 0 1 0 0 1
103 3 3 2 13 1 6 27 4 0 0 0 1 0 0 1
105 2 3 1 19 1 6 27 5 0 0 0 0 1 0 1
105 3 3 1 25 1 6 27 5 0 0 0 0 1 0 1
105 1 1 2 49 1 6 27 5 0 0 0 0 1 0 1
106 1 1 1 28 1 6 23 1 1 0 0 0 0 0 1
107 1 1 1 49 2 1 78 5 0 0 0 0 1 0 3
107 3 3 1 18 2 1 78 5 0 0 0 0 1 0 3
107 4 3 1 21 2 1 78 5 0 0 0 0 1 0 3
107 2 2 2 49 2 1 78 5 0 0 0 0 1 0 3
108 1 1 1 33 2 4 78 1 1 0 0 0 0 0 3
108 2 2 2 28 2 4 78 1 1 0 0 0 0 0 3
109 1 1 1 55 2 1 78 5 0 0 0 0 1 0 3
109 3 3 1 21 2 1 78 5 0 0 0 0 1 0 3
109 2 2 2 53 2 1 78 5 0 0 0 0 1 0 3
110 1 1 1 48 2 1 78 4 0 0 0 1 0 0 3
110 2 2 2 45 2 1 78 4 0 0 0 1 0 0 3
110 3 3 2 20 2 1 78 4 0 0 0 1 0 0 3
110 4 3 2 15 2 1 78 4 0 0 0 1 0 0 3
111 1 1 1 37 2 4 78 2 0 1 0 0 0 0 3
111 2 2 2 34 2 4 78 2 0 1 0 0 0 0 3
112 1 1 1 28 4 4 82 2 0 1 0 0 0 0 3
112 2 2 2 30 4 4 82 2 0 1 0 0 0 0 3
113 1 1 1 64 4 1 63 5 0 0 0 0 1 0 2
113 3 3 1 26 4 1 63 5 0 0 0 0 1 0 2
113 2 2 2 55 4 1 63 5 0 0 0 0 1 0 2
113 4 3 2 24 4 1 63 5 0 0 0 0 1 0 2
115 1 1 1 42 4 4 58 3 0 0 1 0 0 0 2
115 4 3 1 10 4 4 58 3 0 0 1 0 0 0 2
115 2 2 2 39 4 4 58 3 0 0 1 0 0 0 2
115 3 3 2 12 4 4 58 3 0 0 1 0 0 0 2
116 1 1 1 56 4 1 63 5 0 0 0 0 1 0 2
116 3 3 1 29 4 1 63 5 0 0 0 0 1 0 2
116 2 2 2 51 4 1 63 5 0 0 0 0 1 0 2
118 1 1 1 75 4 1 70 6 0 0 0 0 0 1 3
118 2 2 2 74 4 1 70 6 0 0 0 0 0 1 3
119 1 1 1 49 1 4 66 4 0 0 0 1 0 0 2
119 3 3 1 18 1 4 66 4 0 0 0 1 0 0 2
119 4 3 1 17 1 4 66 4 0 0 0 1 0 0 2
119 2 2 2 47 1 4 66 4 0 0 0 1 0 0 2
120 2 3 1 32 4 1 56 5 0 0 0 0 1 0 2
120 1 1 2 64 4 1 56 5 0 0 0 0 1 0 2
120 3 3 2 41 4 1 56 5 0 0 0 0 1 0 2
121 1 1 1 44 4 4 56 4 0 0 0 1 0 0 2
121 3 3 1 17 4 4 56 4 0 0 0 1 0 0 2
121 4 3 1 16 4 4 56 4 0 0 0 1 0 0 2
121 2 2 2 42 4 4 56 4 0 0 0 1 0 0 2
123 1 1 1 44 4 4 56 3 0 0 1 0 0 0 2
123 2 2 2 43 4 4 56 3 0 0 1 0 0 0 2
123 3 3 2 11 4 4 56 3 0 0 1 0 0 0 2
123 5 3 2 14 4 4 56 3 0 0 1 0 0 0 2
125 2 3 1 21 1 4 30 5 0 0 0 0 1 0 1
125 1 1 2 48 1 4 30 5 0 0 0 0 1 0 1
126 1 1 1 49 1 4 30 5 0 0 0 0 1 0 1
126 2 2 2 44 1 4 30 5 0 0 0 0 1 0 1
126 3 3 2 25 1 4 30 5 0 0 0 0 1 0 1
127 1 1 1 75 1 6 25 6 0 0 0 0 0 1 1
128 1 1 1 49 2 1 82 3 0 0 1 0 0 0 3
128 3 3 1 12 2 1 82 3 0 0 1 0 0 0 3
128 2 2 2 43 2 1 82 3 0 0 1 0 0 0 3
129 1 1 2 66 2 1 82 6 0 0 0 0 0 1 3
130 1 1 1 36 2 4 82 3 0 0 1 0 0 0 3
130 2 2 2 41 2 4 82 3 0 0 1 0 0 0 3
130 3 3 2 11 2 4 82 3 0 0 1 0 0 0 3
132 1 1 2 64 2 1 82 6 0 0 0 0 0 1 3
133 1 1 1 34 2 1 82 2 0 1 0 0 0 0 3
133 2 2 2 35 2 1 82 2 0 1 0 0 0 0 3
134 1 1 1 37 2 4 82 2 0 1 0 0 0 0 3
134 2 2 2 35 2 4 82 2 0 1 0 0 0 0 3
135 1 1 1 38 2 4 82 2 0 1 0 0 0 0 3
135 2 2 2 37 2 4 82 2 0 1 0 0 0 0 3
136 1 1 1 31 2 6 83 1 1 0 0 0 0 0 3
136 2 2 2 29 2 6 83 1 1 0 0 0 0 0 3
137 2 2 1 47 2 5 30 3 0 0 1 0 0 0 1
137 3 3 1 19 2 5 30 3 0 0 1 0 0 0 1
137 1 1 2 43 2 5 30 3 0 0 1 0 0 0 1
137 4 3 2 10 2 5 30 3 0 0 1 0 0 0 1
138 2 3 1 24 2 5 30 5 0 0 0 0 1 0 1
138 1 1 2 54 2 5 30 5 0 0 0 0 1 0 1
139 1 1 2 44 2 5 30 4 0 0 0 1 0 0 1
139 2 3 2 13 2 5 30 4 0 0 0 1 0 0 1
139 3 3 2 15 2 5 30 4 0 0 0 1 0 0 1
140 1 1 2 55 2 5 30 5 0 0 0 0 1 0 1
140 2 3 2 29 2 5 30 5 0 0 0 0 1 0 1
141 1 1 1 45 2 5 30 4 0 0 0 1 0 0 1
141 2 2 2 43 2 5 30 4 0 0 0 1 0 0 1
141 3 3 2 15 2 5 30 4 0 0 0 1 0 0 1
141 4 3 2 13 2 5 30 4 0 0 0 1 0 0 1
142 1 1 2 52 2 5 30 4 0 0 0 1 0 0 1
142 2 3 2 23 2 5 30 4 0 0 0 1 0 0 1
142 3 3 2 18 2 5 30 4 0 0 0 1 0 0 1
144 1 1 1 52 2 5 30 5 0 0 0 0 1 0 1
144 4 3 1 19 2 5 30 5 0 0 0 0 1 0 1
144 2 2 2 48 2 5 30 5 0 0 0 0 1 0 1
144 3 3 2 22 2 5 30 5 0 0 0 0 1 0 1
145 1 1 1 61 2 4 72 6 0 0 0 0 0 1 3
145 2 2 2 55 2 4 72 6 0 0 0 0 0 1 3
147 1 1 1 32 2 4 85 1 1 0 0 0 0 0 3
147 2 2 2 33 2 4 85 1 1 0 0 0 0 0 3
148 1 1 1 30 2 1 85 1 1 0 0 0 0 0 3
148 2 2 2 35 2 1 85 1 1 0 0 0 0 0 3
149 2 2 1 54 1 1 46 4 0 0 0 1 0 0 2
149 1 1 2 51 1 1 46 4 0 0 0 1 0 0 2
149 3 3 2 20 1 1 46 4 0 0 0 1 0 0 2
149 4 3 2 13 1 1 46 4 0 0 0 1 0 0 2
149 5 3 2 27 1 1 46 4 0 0 0 1 0 0 2
152 1 1 1 72 1 1 99 5 0 0 0 0 1 0 3
152 3 3 1 39 1 1 99 5 0 0 0 0 1 0 3
152 2 2 2 69 1 1 99 5 0 0 0 0 1 0 3
153 1 1 1 28 1 6 49 2 0 1 0 0 0 0 2
153 2 2 2 27 1 6 49 2 0 1 0 0 0 0 2
155 1 1 2 54 1 6 27 5 0 0 0 0 1 0 1
155 2 3 2 29 1 6 27 5 0 0 0 0 1 0 1
156 1 1 1 48 1 1 76 3 0 0 1 0 0 0 3
156 3 3 1 17 1 1 76 3 0 0 1 0 0 0 3
156 2 2 2 43 1 1 76 3 0 0 1 0 0 0 3
158 1 1 1 52 1 4 50 5 0 0 0 0 1 0 2
158 3 3 1 23 1 4 50 5 0 0 0 0 1 0 2
158 2 2 2 47 1 4 50 5 0 0 0 0 1 0 2
158 4 3 2 20 1 4 50 5 0 0 0 0 1 0 2
159 1 1 1 54 1 6 40 5 0 0 0 0 1 0 2
159 3 3 1 30 1 6 40 5 0 0 0 0 1 0 2
159 2 2 2 51 1 6 40 5 0 0 0 0 1 0 2
159 4 3 2 28 1 6 40 5 0 0 0 0 1 0 2
160 1 1 1 35 1 4 36 2 0 1 0 0 0 0 2
160 2 2 2 34 1 4 36 2 0 1 0 0 0 0 2
162 1 1 1 74 1 1 76 6 0 0 0 0 0 1 3
162 2 2 2 74 1 1 76 6 0 0 0 0 0 1 3
163 3 3 1 16 1 4 40 4 0 0 0 1 0 0 2
163 1 1 2 44 1 4 40 4 0 0 0 1 0 0 2
163 2 3 2 20 1 4 40 4 0 0 0 1 0 0 2
165 1 1 1 72 2 1 114 6 0 0 0 0 0 1 4
165 2 2 2 69 2 1 114 6 0 0 0 0 0 1 4
166 1 1 1 59 2 4 114 5 0 0 0 0 1 0 4
166 3 3 1 26 2 4 114 5 0 0 0 0 1 0 4
166 2 2 2 54 2 4 114 5 0 0 0 0 1 0 4
166 4 3 2 28 2 4 114 5 0 0 0 0 1 0 4
168 1 1 1 55 2 1 114 5 0 0 0 0 1 0 4
168 3 3 1 28 2 1 114 5 0 0 0 0 1 0 4
168 2 2 2 49 2 1 114 5 0 0 0 0 1 0 4
168 4 3 2 26 2 1 114 5 0 0 0 0 1 0 4
171 1 1 1 57 2 1 114 5 0 0 0 0 1 0 4
171 3 3 1 26 2 1 114 5 0 0 0 0 1 0 4
171 2 2 2 50 2 1 114 5 0 0 0 0 1 0 4
172 1 1 1 58 2 1 114 5 0 0 0 0 1 0 4
172 3 3 1 22 2 1 114 5 0 0 0 0 1 0 4
172 4 3 1 25 2 1 114 5 0 0 0 0 1 0 4
172 2 2 2 53 2 1 114 5 0 0 0 0 1 0 4
172 5 3 2 27 2 1 114 5 0 0 0 0 1 0 4
173 1 1 1 45 3 4 59 3 0 0 1 0 0 0 2
173 3 3 1 12 3 4 59 3 0 0 1 0 0 0 2
173 2 2 2 33 3 4 59 3 0 0 1 0 0 0 2
174 1 1 2 80 3 1 59 6 0 0 0 0 0 1 2
175 1 1 1 71 3 1 59 5 0 0 0 0 1 0 2
175 2 2 2 67 3 1 59 5 0 0 0 0 1 0 2
175 3 3 2 28 3 1 59 5 0 0 0 0 1 0 2
176 1 1 1 55 3 1 59 4 0 0 0 1 0 0 2
176 3 3 1 25 3 1 59 4 0 0 0 1 0 0 2
176 2 2 2 50 3 1 59 4 0 0 0 1 0 0 2
176 4 3 2 17 3 1 59 4 0 0 0 1 0 0 2
178 2 2 1 60 3 1 59 5 0 0 0 0 1 0 2
178 3 3 1 26 3 1 59 5 0 0 0 0 1 0 2
178 4 3 1 23 3 1 59 5 0 0 0 0 1 0 2
178 1 1 2 50 3 1 59 5 0 0 0 0 1 0 2
179 1 1 1 52 3 1 59 4 0 0 0 1 0 0 2
179 3 3 1 18 3 1 59 4 0 0 0 1 0 0 2
179 2 2 2 43 3 1 59 4 0 0 0 1 0 0 2
179 4 3 2 17 3 1 59 4 0 0 0 1 0 0 2
180 1 1 1 60 3 1 59 5 0 0 0 0 1 0 2
180 3 3 1 27 3 1 59 5 0 0 0 0 1 0 2
180 2 2 2 60 3 1 59 5 0 0 0 0 1 0 2
182 1 1 2 47 4 1 53 3 0 0 1 0 0 0 2
182 2 3 2 10 4 1 53 3 0 0 1 0 0 0 2
184 1 1 1 36 4 4 59 2 0 1 0 0 0 0 2
184 2 2 2 38 4 4 59 2 0 1 0 0 0 0 2
185 1 1 1 43 4 1 59 3 0 0 1 0 0 0 2
185 3 3 1 15 4 1 59 3 0 0 1 0 0 0 2
185 4 3 1 11 4 1 59 3 0 0 1 0 0 0 2
185 2 2 2 41 4 1 59 3 0 0 1 0 0 0 2
186 1 1 1 36 4 1 50 2 0 1 0 0 0 0 2
186 2 2 2 32 4 1 50 2 0 1 0 0 0 0 2
186 5 3 2 10 4 1 50 2 0 1 0 0 0 0 2
187 1 1 2 55 4 1 53 5 0 0 0 0 1 0 2
187 2 3 2 25 4 1 53 5 0 0 0 0 1 0 2
187 3 3 2 27 4 1 53 5 0 0 0 0 1 0 2
188 1 1 1 67 4 1 53 6 0 0 0 0 0 1 2
188 2 2 2 64 4 1 53 6 0 0 0 0 0 1 2
189 1 1 1 69 4 1 50 5 0 0 0 0 1 0 2
189 3 3 1 34 4 1 50 5 0 0 0 0 1 0 2
189 2 2 2 57 4 1 50 5 0 0 0 0 1 0 2
190 1 1 1 62 4 1 50 5 0 0 0 0 1 0 2
190 3 3 1 27 4 1 50 5 0 0 0 0 1 0 2
190 2 2 2 55 4 1 50 5 0 0 0 0 1 0 2
191 1 1 1 38 3 1 54 2 0 1 0 0 0 0 2
191 2 2 2 36 3 1 54 2 0 1 0 0 0 0 2
192 1 1 2 69 3 4 54 6 0 0 0 0 0 1 2
193 1 1 1 58 3 4 54 5 0 0 0 0 1 0 2
193 3 3 1 27 3 4 54 5 0 0 0 0 1 0 2
193 4 3 1 24 3 4 54 5 0 0 0 0 1 0 2
193 2 2 2 50 3 4 54 5 0 0 0 0 1 0 2
194 1 1 1 77 3 1 54 6 0 0 0 0 0 1 2
194 2 2 2 77 3 1 54 6 0 0 0 0 0 1 2
196 1 1 1 63 4 1 73 5 0 0 0 0 1 0 3
196 3 3 1 37 4 1 73 5 0 0 0 0 1 0 3
196 4 3 1 33 4 1 73 5 0 0 0 0 1 0 3
196 2 2 2 62 4 1 73 5 0 0 0 0 1 0 3
197 1 1 1 66 4 1 73 6 0 0 0 0 0 1 3
197 2 2 2 59 4 1 73 6 0 0 0 0 0 1 3
198 1 1 1 52 4 1 73 3 0 0 1 0 0 0 3
198 3 3 1 13 4 1 73 3 0 0 1 0 0 0 3
198 2 2 2 47 4 1 73 3 0 0 1 0 0 0 3
198 4 3 2 12 4 1 73 3 0 0 1 0 0 0 3
199 1 1 1 43 4 4 73 3 0 0 1 0 0 0 3
199 2 2 2 41 4 4 73 3 0 0 1 0 0 0 3
199 3 3 2 11 4 4 73 3 0 0 1 0 0 0 3
200 2 3 1 26 4 1 73 5 0 0 0 0 1 0 3
200 3 3 1 28 4 1 73 5 0 0 0 0 1 0 3
200 1 1 2 53 4 1 73 5 0 0 0 0 1 0 3
201 1 1 1 53 4 1 73 5 0 0 0 0 1 0 3
201 3 3 1 27 4 1 73 5 0 0 0 0 1 0 3
201 2 2 2 50 4 1 73 5 0 0 0 0 1 0 3
202 1 1 1 77 4 1 73 5 0 0 0 0 1 0 3
202 3 3 1 35 4 1 73 5 0 0 0 0 1 0 3
202 2 2 2 60 4 1 73 5 0 0 0 0 1 0 3
204 1 1 1 56 4 1 53 5 0 0 0 0 1 0 2
204 2 2 2 53 4 1 53 5 0 0 0 0 1 0 2
204 3 3 2 22 4 1 53 5 0 0 0 0 1 0 2
205 1 1 1 60 4 4 66 5 0 0 0 0 1 0 2
205 3 3 1 29 4 4 66 5 0 0 0 0 1 0 2
205 4 3 1 27 4 4 66 5 0 0 0 0 1 0 2
205 2 2 2 56 4 4 66 5 0 0 0 0 1 0 2
206 1 1 1 67 4 1 76 6 0 0 0 0 0 1 3
206 2 2 2 67 4 1 76 6 0 0 0 0 0 1 3
208 1 1 1 46 4 1 66 4 0 0 0 1 0 0 2
208 4 3 1 14 4 1 66 4 0 0 0 1 0 0 2
208 2 2 2 45 4 1 66 4 0 0 0 1 0 0 2
208 3 3 2 17 4 1 66 4 0 0 0 1 0 0 2
209 1 1 1 42 4 4 56 2 0 1 0 0 0 0 2
209 3 3 1 10 4 4 56 2 0 1 0 0 0 0 2
209 2 2 2 38 4 4 56 2 0 1 0 0 0 0 2
210 3 3 1 12 4 1 56 3 0 0 1 0 0 0 2
210 1 1 2 40 4 1 56 3 0 0 1 0 0 0 2
210 2 3 2 10 4 1 56 3 0 0 1 0 0 0 2
212 1 1 2 37 1 4 63 2 0 1 0 0 0 0 2
214 1 1 1 63 3 1 40 6 0 0 0 0 0 1 2
215 1 1 1 62 3 1 40 5 0 0 0 0 1 0 2
215 3 3 1 28 3 1 40 5 0 0 0 0 1 0 2
215 2 2 2 57 3 1 40 5 0 0 0 0 1 0 2
216 1 1 2 71 3 1 40 6 0 0 0 0 0 1 2
217 1 1 2 49 4 1 40 5 0 0 0 0 1 0 2
217 2 3 2 24 4 1 40 5 0 0 0 0 1 0 2
218 1 1 1 74 1 1 37 6 0 0 0 0 0 1 2
218 2 2 2 67 1 1 37 6 0 0 0 0 0 1 2
220 1 1 1 51 4 4 66 4 0 0 0 1 0 0 2
220 4 3 1 13 4 4 66 4 0 0 0 1 0 0 2
220 5 3 1 18 4 4 66 4 0 0 0 1 0 0 2
220 2 2 2 49 4 4 66 4 0 0 0 1 0 0 2
220 3 3 2 16 4 4 66 4 0 0 0 1 0 0 2
221 1 1 2 81 1 6 40 6 0 0 0 0 0 1 2
222 1 1 1 45 2 1 85 3 0 0 1 0 0 0 3
222 4 3 1 10 2 1 85 3 0 0 1 0 0 0 3
222 2 2 2 41 2 1 85 3 0 0 1 0 0 0 3
222 3 3 2 15 2 1 85 3 0 0 1 0 0 0 3
223 1 1 2 51 2 1 85 5 0 0 0 0 1 0 3
223 2 3 2 25 2 1 85 5 0 0 0 0 1 0 3
224 2 3 1 12 2 4 85 4 0 0 0 1 0 0 3
224 1 1 2 47 2 4 85 4 0 0 0 1 0 0 3
224 3 3 2 18 2 4 85 4 0 0 0 1 0 0 3
225 1 1 1 68 2 1 85 6 0 0 0 0 0 1 3
225 2 2 2 67 2 1 85 6 0 0 0 0 0 1 3
226 1 1 1 50 2 1 85 4 0 0 0 1 0 0 3
226 4 3 1 17 2 1 85 4 0 0 0 1 0 0 3
226 2 2 2 46 2 1 85 4 0 0 0 1 0 0 3
226 3 3 2 19 2 1 85 4 0 0 0 1 0 0 3
229 2 2 1 67 2 1 85 5 0 0 0 0 1 0 3
229 1 1 2 57 2 1 85 5 0 0 0 0 1 0 3
229 3 3 2 37 2 1 85 5 0 0 0 0 1 0 3
232 1 1 1 54 2 1 86 5 0 0 0 0 1 0 3
232 2 2 2 53 2 1 86 5 0 0 0 0 1 0 3
232 3 3 2 29 2 1 86 5 0 0 0 0 1 0 3
233 1 1 1 57 2 1 86 5 0 0 0 0 1 0 3
233 2 2 2 52 2 1 86 5 0 0 0 0 1 0 3
233 3 3 2 24 2 1 86 5 0 0 0 0 1 0 3
235 1 1 2 51 2 1 86 3 0 0 1 0 0 0 3
236 1 1 1 41 2 4 86 2 0 1 0 0 0 0 3
236 5 3 1 12 2 4 86 2 0 1 0 0 0 0 3
236 2 2 2 39 2 4 86 2 0 1 0 0 0 0 3
236 3 3 2 10 2 4 86 2 0 1 0 0 0 0 3
237 1 1 1 48 2 1 86 4 0 0 0 1 0 0 3
237 2 2 2 48 2 1 86 4 0 0 0 1 0 0 3
237 3 3 2 20 2 1 86 4 0 0 0 1 0 0 3
237 4 3 2 16 2 1 86 4 0 0 0 1 0 0 3
238 1 1 2 53 4 1 50 5 0 0 0 0 1 0 2
238 2 3 2 29 4 1 50 5 0 0 0 0 1 0 2
240 2 3 1 31 4 1 50 5 0 0 0 0 1 0 2
240 1 1 2 61 4 1 50 5 0 0 0 0 1 0 2
241 2 3 1 24 4 1 50 5 0 0 0 0 1 0 2
241 1 1 2 51 4 1 50 5 0 0 0 0 1 0 2
242 1 1 1 39 4 6 50 3 0 0 1 0 0 0 2
242 3 3 1 11 4 6 50 3 0 0 1 0 0 0 2
242 2 2 2 38 4 6 50 3 0 0 1 0 0 0 2
245 1 1 1 48 4 1 50 4 0 0 0 1 0 0 2
245 3 3 1 17 4 1 50 4 0 0 0 1 0 0 2
245 2 2 2 42 4 1 50 4 0 0 0 1 0 0 2
246 1 1 1 58 5 4 50 5 0 0 0 0 1 0 2
246 2 2 2 50 5 4 50 5 0 0 0 0 1 0 2
246 3 3 2 26 5 4 50 5 0 0 0 0 1 0 2
247 2 2 1 43 4 1 46 3 0 0 1 0 0 0 2
247 1 1 2 41 4 1 46 3 0 0 1 0 0 0 2
247 3 3 2 11 4 1 46 3 0 0 1 0 0 0 2
248 1 1 1 40 4 1 70 1 1 0 0 0 0 0 3
248 2 2 2 32 4 1 70 1 1 0 0 0 0 0 3
249 1 1 1 43 4 1 64 4 0 0 0 1 0 0 2
249 3 3 1 16 4 1 64 4 0 0 0 1 0 0 2
249 2 2 2 41 4 1 64 4 0 0 0 1 0 0 2
249 4 3 2 15 4 1 64 4 0 0 0 1 0 0 2
250 2 2 1 32 4 1 54 1 1 0 0 0 0 0 2
250 1 1 2 30 4 1 54 1 1 0 0 0 0 0 2
251 1 1 1 65 1 1 132 6 0 0 0 0 0 1 4
251 2 2 2 62 1 1 132 6 0 0 0 0 0 1 4
254 1 1 1 37 2 4 85 2 0 1 0 0 0 0 3
254 2 2 2 37 2 4 85 2 0 1 0 0 0 0 3
256 1 1 1 50 2 1 85 4 0 0 0 1 0 0 3
256 2 2 2 47 2 1 85 4 0 0 0 1 0 0 3
256 3 3 2 16 2 1 85 4 0 0 0 1 0 0 3
256 4 3 2 14 2 1 85 4 0 0 0 1 0 0 3
257 1 1 1 46 2 4 85 4 0 0 0 1 0 0 3
257 4 3 1 16 2 4 85 4 0 0 0 1 0 0 3
257 2 2 2 44 2 4 85 4 0 0 0 1 0 0 3
257 3 3 2 19 2 4 85 4 0 0 0 1 0 0 3
259 1 1 1 55 2 1 85 5 0 0 0 0 1 0 3
259 2 2 2 53 2 1 85 5 0 0 0 0 1 0 3
259 3 3 2 31 2 1 85 5 0 0 0 0 1 0 3
261 1 1 1 65 2 1 145 6 0 0 0 0 0 1 5
261 2 2 2 62 2 1 145 6 0 0 0 0 0 1 5
262 1 1 1 44 3 1 56 4 0 0 0 1 0 0 2
262 3 3 1 19 3 1 56 4 0 0 0 1 0 0 2
262 2 2 2 42 3 1 56 4 0 0 0 1 0 0 2
262 4 3 2 15 3 1 56 4 0 0 0 1 0 0 2
263 1 1 1 49 3 1 54 5 0 0 0 0 1 0 2
263 4 3 1 22 3 1 54 5 0 0 0 0 1 0 2
263 2 2 2 47 3 1 54 5 0 0 0 0 1 0 2
263 3 3 2 19 3 1 54 5 0 0 0 0 1 0 2
266 1 1 1 54 3 1 56 5 0 0 0 0 1 0 2
266 3 3 1 29 3 1 56 5 0 0 0 0 1 0 2
266 2 2 2 49 3 1 56 5 0 0 0 0 1 0 2
267 1 1 2 63 3 1 42 6 0 0 0 0 0 1 2
268 1 1 1 45 3 1 43 3 0 0 1 0 0 0 2
268 3 3 1 11 3 1 43 3 0 0 1 0 0 0 2
268 2 2 2 36 3 1 43 3 0 0 1 0 0 0 2
268 5 3 2 12 3 1 43 3 0 0 1 0 0 0 2
269 1 1 1 45 3 1 47 3 0 0 1 0 0 0 2
269 2 2 2 42 3 1 47 3 0 0 1 0 0 0 2
269 3 3 2 11 3 1 47 3 0 0 1 0 0 0 2
270 1 1 1 34 2 4 59 2 0 1 0 0 0 0 2
270 2 2 2 34 2 4 59 2 0 1 0 0 0 0 2
271 2 2 1 60 2 1 59 5 0 0 0 0 1 0 2
271 3 3 1 34 2 1 59 5 0 0 0 0 1 0 2
271 1 1 2 57 2 1 59 5 0 0 0 0 1 0 2
272 1 1 1 35 2 1 59 2 0 1 0 0 0 0 2
272 2 2 2 35 2 1 59 2 0 1 0 0 0 0 2
273 1 1 1 35 2 1 59 2 0 1 0 0 0 0 2
273 2 2 2 39 2 1 59 2 0 1 0 0 0 0 2
275 1 1 1 33 2 1 59 2 0 1 0 0 0 0 2
275 2 2 2 29 2 1 59 2 0 1 0 0 0 0 2
276 1 1 1 30 2 4 59 1 1 0 0 0 0 0 2
277 1 1 1 47 2 1 59 4 0 0 0 1 0 0 2
277 2 2 2 48 2 1 59 4 0 0 0 1 0 0 2
277 3 3 2 17 2 1 59 4 0 0 0 1 0 0 2
277 4 3 2 15 2 1 59 4 0 0 0 1 0 0 2
278 1 1 1 78 2 1 84 6 0 0 0 0 0 1 3
278 2 2 2 79 2 1 84 6 0 0 0 0 0 1 3
280 1 1 1 56 2 1 84 5 0 0 0 0 1 0 3
280 2 2 2 53 2 1 84 5 0 0 0 0 1 0 3
280 3 3 2 27 2 1 84 5 0 0 0 0 1 0 3
281 1 1 1 50 2 1 84 4 0 0 0 1 0 0 3
281 4 3 1 17 2 1 84 4 0 0 0 1 0 0 3
281 2 2 2 45 2 1 84 4 0 0 0 1 0 0 3
281 3 3 2 22 2 1 84 4 0 0 0 1 0 0 3
283 1 1 1 51 2 1 84 5 0 0 0 0 1 0 3
283 4 3 1 25 2 1 84 5 0 0 0 0 1 0 3
283 2 2 2 49 2 1 84 5 0 0 0 0 1 0 3
283 3 3 2 27 2 1 84 5 0 0 0 0 1 0 3
285 1 1 1 48 2 1 122 3 0 0 1 0 0 0 4
285 5 3 1 17 2 1 122 3 0 0 1 0 0 0 4
285 2 2 2 41 2 1 122 3 0 0 1 0 0 0 4
285 3 3 2 15 2 1 122 3 0 0 1 0 0 0 4
286 1 1 1 57 2 1 122 5 0 0 0 0 1 0 4
286 4 3 1 25 2 1 122 5 0 0 0 0 1 0 4
286 2 2 2 51 2 1 122 5 0 0 0 0 1 0 4
286 3 3 2 29 2 1 122 5 0 0 0 0 1 0 4
287 1 1 1 43 2 1 122 2 0 1 0 0 0 0 4
287 2 2 2 40 2 1 122 2 0 1 0 0 0 0 4
287 3 3 2 12 2 1 122 2 0 1 0 0 0 0 4
290 1 1 1 46 2 1 102 3 0 0 1 0 0 0 4
290 4 3 1 10 2 1 102 3 0 0 1 0 0 0 4
290 2 2 2 42 2 1 102 3 0 0 1 0 0 0 4
290 3 3 2 15 2 1 102 3 0 0 1 0 0 0 4
291 1 1 1 30 2 4 102 2 0 1 0 0 0 0 4
291 2 2 2 26 2 4 102 2 0 1 0 0 0 0 4
292 1 1 2 61 1 1 59 6 0 0 0 0 0 1 2
295 1 1 1 47 1 4 43 3 0 0 1 0 0 0 2
295 3 3 1 11 1 4 43 3 0 0 1 0 0 0 2
295 2 2 2 43 1 4 43 3 0 0 1 0 0 0 2
297 1 1 1 43 1 4 43 2 0 1 0 0 0 0 2
297 2 2 2 46 1 4 43 2 0 1 0 0 0 0 2
298 1 1 1 40 1 4 56 2 0 1 0 0 0 0 2
298 2 2 2 37 1 4 56 2 0 1 0 0 0 0 2
299 2 3 1 24 1 4 50 5 0 0 0 0 1 0 2
299 1 1 2 60 1 4 50 5 0 0 0 0 1 0 2
300 1 1 1 46 4 4 83 4 0 0 0 1 0 0 3
300 2 2 2 43 4 4 83 4 0 0 0 1 0 0 3
300 3 3 2 13 4 4 83 4 0 0 0 1 0 0 3
My understanding is that R is implemented as copy-on-write.
Take for instance:
X <- 1:1000
y <- x # no copy made. x & y share the reference
y[1] <- 8 # now a copy is made.
If x is growing, the copies take longer and longer, and the script slows down.
I'm not that familiar with macro variables, but I suspect something like this is happening.
If you're working with a list, every time you add a new element to the list, every thing is recopied.
y <- list()
y$this <- 1:5
y$that <- 6:10 # now every thing was recopied.
Therefore it's better to allocate first. It really helps the performance.
y <- vector("list", 2)
y[[1]] <- 1:5
y[[2]] <- 6:10
These slides are really good: a link take a look!

Resources