Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/storopoli/rcpp
Como fazer seu código R ficar mais rápido com Rcpp
https://github.com/storopoli/rcpp
cpp cpp11 rcpp rcpparmadillo rcppeigen rcppparallel rstats
Last synced: about 1 month ago
JSON representation
Como fazer seu código R ficar mais rápido com Rcpp
- Host: GitHub
- URL: https://github.com/storopoli/rcpp
- Owner: storopoli
- License: cc-by-sa-4.0
- Created: 2021-01-08T19:19:52.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-03T11:10:04.000Z (almost 3 years ago)
- Last Synced: 2024-10-13T19:31:24.466Z (3 months ago)
- Topics: cpp, cpp11, rcpp, rcpparmadillo, rcppeigen, rcppparallel, rstats
- Language: R
- Homepage: https://storopoli.io/Rcpp
- Size: 8.12 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.html
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
/* Hide doc at startup (prevent jankiness while JS renders/transforms) */
body {
visibility: hidden;
}
Rcpp - A interface entre R e C++: Untitled
{"type":"list","attributes":{},"value":[]}
window.headroom_prevent_pin = false;
window.document.addEventListener("DOMContentLoaded", function (event) {
// initialize headroom for banner
var header = $('header').get(0);
var headerHeight = header.offsetHeight;
var headroom = new Headroom(header, {
tolerance: 5,
onPin : function() {
if (window.headroom_prevent_pin) {
window.headroom_prevent_pin = false;
headroom.unpin();
}
}
});
headroom.init();
if(window.location.hash)
headroom.unpin();
$(header).addClass('headroom--transition');// offset scroll location for banner on hash change
// (see: https://github.com/WickyNilliams/headroom.js/issues/38)
window.addEventListener("hashchange", function(event) {
window.scrollTo(0, window.pageYOffset - (headerHeight + 25));
});// responsive menu
$('.distill-site-header').each(function(i, val) {
var topnav = $(this);
var toggle = topnav.find('.nav-toggle');
toggle.on('click', function() {
topnav.toggleClass('responsive');
});
});// nav dropdowns
$('.nav-dropbtn').click(function(e) {
$(this).next('.nav-dropdown-content').toggleClass('nav-dropdown-active');
$(this).parent().siblings('.nav-dropdown')
.children('.nav-dropdown-content').removeClass('nav-dropdown-active');
});
$("body").click(function(e){
$('.nav-dropdown-content').removeClass('nav-dropdown-active');
});
$(".nav-dropdown").click(function(e){
e.stopPropagation();
});
});
/* Theme (user-documented overrideables for nav appearance) */
.distill-site-nav {
color: rgba(255, 255, 255, 0.8);
background-color: #0F2E3D;
font-size: 15px;
font-weight: 300;
}.distill-site-nav a {
color: inherit;
text-decoration: none;
}.distill-site-nav a:hover {
color: white;
}@media print {
.distill-site-nav {
display: none;
}
}.distill-site-header {
}
.distill-site-footer {
}
/* Site Header */
.distill-site-header {
width: 100%;
box-sizing: border-box;
z-index: 3;
}.distill-site-header .nav-left {
display: inline-block;
margin-left: 8px;
}@media screen and (max-width: 768px) {
.distill-site-header .nav-left {
margin-left: 0;
}
}.distill-site-header .nav-right {
float: right;
margin-right: 8px;
}.distill-site-header a,
.distill-site-header .title {
display: inline-block;
text-align: center;
padding: 14px 10px 14px 10px;
}.distill-site-header .title {
font-size: 18px;
min-width: 150px;
}.distill-site-header .logo {
padding: 0;
}.distill-site-header .logo img {
display: none;
max-height: 20px;
width: auto;
margin-bottom: -4px;
}.distill-site-header .nav-image img {
max-height: 18px;
width: auto;
display: inline-block;
margin-bottom: -3px;
}@media screen and (min-width: 1000px) {
.distill-site-header .logo img {
display: inline-block;
}
.distill-site-header .nav-left {
margin-left: 20px;
}
.distill-site-header .nav-right {
margin-right: 20px;
}
.distill-site-header .title {
padding-left: 12px;
}
}.distill-site-header .nav-toggle {
display: none;
}.nav-dropdown {
display: inline-block;
position: relative;
}.nav-dropdown .nav-dropbtn {
border: none;
outline: none;
color: rgba(255, 255, 255, 0.8);
padding: 16px 10px;
background-color: transparent;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
margin: 0;
margin-top: 1px;
z-index: 2;
}.nav-dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 200px;
border: 1px solid rgba(0,0,0,0.15);
border-radius: 4px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
z-index: 1;
margin-top: 2px;
white-space: nowrap;
padding-top: 4px;
padding-bottom: 4px;
}.nav-dropdown-content hr {
margin-top: 4px;
margin-bottom: 4px;
border: none;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}.nav-dropdown-active {
display: block;
}.nav-dropdown-content a, .nav-dropdown-content .nav-dropdown-header {
color: black;
padding: 6px 24px;
text-decoration: none;
display: block;
text-align: left;
}.nav-dropdown-content .nav-dropdown-header {
display: block;
padding: 5px 24px;
padding-bottom: 0;
text-transform: uppercase;
font-size: 14px;
color: #999999;
white-space: nowrap;
}.nav-dropdown:hover .nav-dropbtn {
color: white;
}.nav-dropdown-content a:hover {
background-color: #ddd;
color: black;
}.nav-right .nav-dropdown-content {
margin-left: -45%;
right: 0;
}@media screen and (max-width: 768px) {
.distill-site-header a, .distill-site-header .nav-dropdown {display: none;}
.distill-site-header a.nav-toggle {
float: right;
display: block;
}
.distill-site-header .title {
margin-left: 0;
}
.distill-site-header .nav-right {
margin-right: 0;
}
.distill-site-header {
overflow: hidden;
}
.nav-right .nav-dropdown-content {
margin-left: 0;
}
}@media screen and (max-width: 768px) {
.distill-site-header.responsive {position: relative; min-height: 500px; }
.distill-site-header.responsive a.nav-toggle {
position: absolute;
right: 0;
top: 0;
}
.distill-site-header.responsive a,
.distill-site-header.responsive .nav-dropdown {
display: block;
text-align: left;
}
.distill-site-header.responsive .nav-left,
.distill-site-header.responsive .nav-right {
width: 100%;
}
.distill-site-header.responsive .nav-dropdown {float: none;}
.distill-site-header.responsive .nav-dropdown-content {position: relative;}
.distill-site-header.responsive .nav-dropdown .nav-dropbtn {
display: block;
width: 100%;
text-align: left;
}
}/* Site Footer */
.distill-site-footer {
width: 100%;
overflow: hidden;
box-sizing: border-box;
z-index: 3;
margin-top: 30px;
padding-top: 30px;
padding-bottom: 30px;
text-align: center;
}/* Headroom */
d-title {
padding-top: 6rem;
}@media print {
d-title {
padding-top: 4rem;
}
}.headroom {
z-index: 1000;
position: fixed;
top: 0;
left: 0;
right: 0;
}.headroom--transition {
transition: all .4s ease-in-out;
}.headroom--unpinned {
top: -100px;
}.headroom--pinned {
top: 0;
}
function getMeta(metaName) {
var metas = document.getElementsByTagName('meta');
for (let i = 0; i < metas.length; i++) {
if (metas[i].getAttribute('name') === metaName) {
return metas[i].getAttribute('content');
}
}
return '';
}function offsetURL(url) {
var offset = getMeta('distill:offset');
return offset ? offset + '/' + url : url;
}function createFuseIndex() {
// create fuse index
var options = {
keys: [
{ name: 'title', weight: 20 },
{ name: 'categories', weight: 15 },
{ name: 'description', weight: 10 },
{ name: 'contents', weight: 5 },
],
ignoreLocation: true,
threshold: 0
};
var fuse = new window.Fuse([], options);// fetch the main search.json
return fetch(offsetURL('search.json'))
.then(function(response) {
if (response.status == 200) {
return response.json().then(function(json) {
// index main articles
json.articles.forEach(function(article) {
fuse.add(article);
});
// download collections and index their articles
return Promise.all(json.collections.map(function(collection) {
return fetch(offsetURL(collection)).then(function(response) {
if (response.status === 200) {
return response.json().then(function(articles) {
articles.forEach(function(article) {
fuse.add(article);
});
})
} else {
return Promise.reject(
new Error('Unexpected status from search index request: ' +
response.status)
);
}
});
})).then(function() {
return fuse;
});
});} else {
return Promise.reject(
new Error('Unexpected status from search index request: ' +
response.status)
);
}
});
}window.document.addEventListener("DOMContentLoaded", function (event) {
// get search element (bail if we don't have one)
var searchEl = window.document.getElementById('distill-search');
if (!searchEl)
return;createFuseIndex()
.then(function(fuse) {// make search box visible
searchEl.classList.remove('hidden');// initialize autocomplete
var options = {
autoselect: true,
hint: false,
minLength: 2,
};
window.autocomplete(searchEl, options, [{
source: function(query, callback) {
const searchOptions = {
isCaseSensitive: false,
shouldSort: true,
minMatchCharLength: 2,
limit: 10,
};
var results = fuse.search(query, searchOptions);
callback(results
.map(function(result) { return result.item; })
.filter(function(item) { return !!item.description; })
);
},
templates: {
suggestion: function(suggestion) {
var html = `
<div class="search-item">
<h3>${suggestion.title}</h3>
<div class="search-item-description">
${suggestion.description}
</div>
<div class="search-item-preview">
<img src="${suggestion.preview ? offsetURL(suggestion.preview) : ''}"</img>
</div>
</div>
`;
return html;
}
}
}]).on('autocomplete:selected', function(event, suggestion) {
window.location.href = offsetURL(suggestion.path);
});
// remove inline display style on autocompleter (we want to
// manage responsive display via css)
$('.algolia-autocomplete').css("display", "");
})
.catch(function(error) {
console.log(error);
});});
/* Algolioa Autocomplete */
.algolia-autocomplete {
display: inline-block;
margin-left: 10px;
vertical-align: sub;
background-color: white;
color: black;
padding: 6px;
padding-top: 8px;
padding-bottom: 0;
border-radius: 6px;
border: 1px #0F2E3D solid;
width: 180px;
}@media screen and (max-width: 768px) {
.distill-site-nav .algolia-autocomplete {
display: none;
visibility: hidden;
}
.distill-site-nav.responsive .algolia-autocomplete {
display: inline-block;
visibility: visible;
}
.distill-site-nav.responsive .algolia-autocomplete .aa-dropdown-menu {
margin-left: 0;
width: 400px;
max-height: 400px;
}
}.algolia-autocomplete .aa-input, .algolia-autocomplete .aa-hint {
width: 90%;
outline: none;
border: none;
}.algolia-autocomplete .aa-hint {
color: #999;
}
.algolia-autocomplete .aa-dropdown-menu {
width: 550px;
max-height: 70vh;
overflow-x: visible;
overflow-y: scroll;
padding: 5px;
margin-top: 3px;
margin-left: -150px;
background-color: #fff;
border-radius: 5px;
border: 1px solid #999;
border-top: none;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion {
cursor: pointer;
padding: 5px 4px;
border-bottom: 1px solid #eee;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion:last-of-type {
border-bottom: none;
margin-bottom: 2px;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item {
overflow: hidden;
font-size: 0.8em;
line-height: 1.4em;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item h3 {
margin-block-start: 0;
margin-block-end: 5px;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-description {
display: inline-block;
overflow: hidden;
height: 2.8em;
width: 80%;
margin-right: 4%;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview {
display: inline-block;
width: 15%;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview img {
height: 3em;
width: auto;
display: none;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview img[src] {
display: initial;
}.algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor {
background-color: #eee;
}
.algolia-autocomplete .aa-dropdown-menu .aa-suggestion em {
font-weight: bold;
font-style: normal;
}
body {
background-color: white;
}.pandoc-table {
width: 100%;
}.pandoc-table>caption {
margin-bottom: 10px;
}.pandoc-table th:not([align]) {
text-align: left;
}.pagedtable-footer {
font-size: 15px;
}d-byline .byline {
grid-template-columns: 2fr 2fr;
}d-byline .byline h3 {
margin-block-start: 1.5em;
}d-byline .byline .authors-affiliations h3 {
margin-block-start: 0.5em;
}.authors-affiliations .orcid-id {
width: 16px;
height:16px;
margin-left: 4px;
margin-right: 4px;
vertical-align: middle;
padding-bottom: 2px;
}d-title .dt-tags {
margin-top: 1em;
grid-column: text;
}.dt-tags .dt-tag {
text-decoration: none;
display: inline-block;
color: rgba(0,0,0,0.6);
padding: 0em 0.4em;
margin-right: 0.5em;
margin-bottom: 0.4em;
font-size: 70%;
border: 1px solid rgba(0,0,0,0.2);
border-radius: 3px;
text-transform: uppercase;
font-weight: 500;
}d-article table.gt_table td,
d-article table.gt_table th {
border-bottom: none;
}.html-widget {
margin-bottom: 2.0em;
}.l-screen-inset {
padding-right: 16px;
}.l-screen .caption {
margin-left: 10px;
}.shaded {
background: rgb(247, 247, 247);
padding-top: 20px;
padding-bottom: 20px;
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}.shaded .html-widget {
margin-bottom: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
}.shaded .shaded-content {
background: white;
}.text-output {
margin-top: 0;
line-height: 1.5em;
}.hidden {
display: none !important;
}d-article {
padding-top: 2.5rem;
padding-bottom: 30px;
}d-appendix {
padding-top: 30px;
}d-article>p>img {
width: 100%;
}d-article h2 {
margin: 1rem 0 1.5rem 0;
}d-article h3 {
margin-top: 1.5rem;
}d-article iframe {
border: 1px solid rgba(0, 0, 0, 0.1);
margin-bottom: 2.0em;
width: 100%;
}/* Tweak code blocks */
d-article div.sourceCode code,
d-article pre code {
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}d-article pre,
d-article div.sourceCode,
d-article div.sourceCode pre {
overflow: auto;
}d-article div.sourceCode {
background-color: white;
}d-article div.sourceCode pre {
padding-left: 10px;
font-size: 12px;
border-left: 2px solid rgba(0,0,0,0.1);
}d-article pre {
font-size: 12px;
color: black;
background: none;
margin-top: 0;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}d-article pre a {
border-bottom: none;
}d-article pre a:hover {
border-bottom: none;
text-decoration: underline;
}@media(min-width: 768px) {
d-article pre,
d-article div.sourceCode,
d-article div.sourceCode pre {
overflow: visible !important;
}d-article div.sourceCode pre {
padding-left: 18px;
font-size: 14px;
}d-article pre {
font-size: 14px;
}}
figure img.external {
background: white;
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
padding: 18px;
box-sizing: border-box;
}/* CSS for d-contents */
.d-contents {
grid-column: text;
color: rgba(0,0,0,0.8);
font-size: 0.9em;
padding-bottom: 1em;
margin-bottom: 1em;
padding-bottom: 0.5em;
margin-bottom: 1em;
padding-left: 0.25em;
justify-self: start;
}@media(min-width: 1000px) {
.d-contents.d-contents-float {
height: 0;
grid-column-start: 1;
grid-column-end: 4;
justify-self: center;
padding-right: 3em;
padding-left: 2em;
}
}.d-contents nav h3 {
font-size: 18px;
margin-top: 0;
margin-bottom: 1em;
}.d-contents li {
list-style-type: none
}.d-contents nav > ul {
padding-left: 0;
}.d-contents ul {
padding-left: 1em
}.d-contents nav ul li {
margin-top: 0.6em;
margin-bottom: 0.2em;
}.d-contents nav a {
font-size: 13px;
border-bottom: none;
text-decoration: none
color: rgba(0, 0, 0, 0.8);
}.d-contents nav a:hover {
text-decoration: underline solid rgba(0, 0, 0, 0.6)
}.d-contents nav > ul > li > a {
font-weight: 600;
}.d-contents nav > ul > li > ul {
font-weight: inherit;
}.d-contents nav > ul > li > ul > li {
margin-top: 0.2em;
}.d-contents nav ul {
margin-top: 0;
margin-bottom: 0.25em;
}.d-article-with-toc h2:nth-child(2) {
margin-top: 0;
}/* Figure */
.figure {
position: relative;
margin-bottom: 2.5em;
margin-top: 1.5em;
}.figure img {
width: 100%;
}.figure .caption {
color: rgba(0, 0, 0, 0.6);
font-size: 12px;
line-height: 1.5em;
}.figure img.external {
background: white;
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
padding: 18px;
box-sizing: border-box;
}.figure .caption a {
color: rgba(0, 0, 0, 0.6);
}.figure .caption b,
.figure .caption strong, {
font-weight: 600;
color: rgba(0, 0, 0, 1.0);
}/* Citations */
d-article .citation {
color: inherit;
cursor: inherit;
}div.hanging-indent{
margin-left: 1em; text-indent: -1em;
}/* Tweak 1000px media break to show more text */
@media(min-width: 1000px) {
.base-grid,
distill-header,
d-title,
d-abstract,
d-article,
d-appendix,
distill-appendix,
d-byline,
d-footnote-list,
d-citation-list,
distill-footer {
grid-template-columns: [screen-start] 1fr [page-start kicker-start] 80px [middle-start] 50px [text-start kicker-end] 65px 65px 65px 65px 65px 65px 65px 65px [text-end gutter-start] 65px [middle-end] 65px [page-end gutter-end] 1fr [screen-end];
grid-column-gap: 16px;
}.grid {
grid-column-gap: 16px;
}d-article {
font-size: 1.06rem;
line-height: 1.7em;
}
figure .caption, .figure .caption, figure figcaption {
font-size: 13px;
}
}@media(min-width: 1180px) {
.base-grid,
distill-header,
d-title,
d-abstract,
d-article,
d-appendix,
distill-appendix,
d-byline,
d-footnote-list,
d-citation-list,
distill-footer {
grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];
grid-column-gap: 32px;
}.grid {
grid-column-gap: 32px;
}
}/* Get the citation styles for the appendix (not auto-injected on render since
we do our own rendering of the citation appendix) */d-appendix .citation-appendix,
.d-appendix .citation-appendix {
font-size: 11px;
line-height: 15px;
border-left: 1px solid rgba(0, 0, 0, 0.1);
padding-left: 18px;
border: 1px solid rgba(0,0,0,0.1);
background: rgba(0, 0, 0, 0.02);
padding: 10px 18px;
border-radius: 3px;
color: rgba(150, 150, 150, 1);
overflow: hidden;
margin-top: -12px;
white-space: pre-wrap;
word-wrap: break-word;
}/* Include appendix styles here so they can be overridden */
d-appendix {
contain: layout style;
font-size: 0.8em;
line-height: 1.7em;
margin-top: 60px;
margin-bottom: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
color: rgba(0,0,0,0.5);
padding-top: 60px;
padding-bottom: 48px;
}d-appendix h3 {
grid-column: page-start / text-start;
font-size: 15px;
font-weight: 500;
margin-top: 1em;
margin-bottom: 0;
color: rgba(0,0,0,0.65);
}d-appendix h3 + * {
margin-top: 1em;
}d-appendix ol {
padding: 0 0 0 15px;
}@media (min-width: 768px) {
d-appendix ol {
padding: 0 0 0 30px;
margin-left: -30px;
}
}d-appendix li {
margin-bottom: 1em;
}d-appendix a {
color: rgba(0, 0, 0, 0.6);
}d-appendix > * {
grid-column: text;
}d-appendix > d-footnote-list,
d-appendix > d-citation-list,
d-appendix > distill-appendix {
grid-column: screen;
}/* Include footnote styles here so they can be overridden */
d-footnote-list {
contain: layout style;
}d-footnote-list > * {
grid-column: text;
}d-footnote-list a.footnote-backlink {
color: rgba(0,0,0,0.3);
padding-left: 0.5em;
}/* Anchor.js */
.anchorjs-link {
/*transition: all .25s linear; */
text-decoration: none;
border-bottom: none;
}
*:hover > .anchorjs-link {
margin-left: -1.125em !important;
text-decoration: none;
border-bottom: none;
}/* Social footer */
.social_footer {
margin-top: 30px;
margin-bottom: 0;
color: rgba(0,0,0,0.67);
}.disqus-comments {
margin-right: 30px;
}.disqus-comment-count {
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
cursor: pointer;
}#disqus_thread {
margin-top: 30px;
}.article-sharing a {
border-bottom: none;
margin-right: 8px;
}.article-sharing a:hover {
border-bottom: none;
}.sidebar-section.subscribe {
font-size: 12px;
line-height: 1.6em;
}.subscribe p {
margin-bottom: 0.5em;
}.article-footer .subscribe {
font-size: 15px;
margin-top: 45px;
}.sidebar-section.custom {
font-size: 12px;
line-height: 1.6em;
}.custom p {
margin-bottom: 0.5em;
}/* Styles for listing layout (hide title) */
.layout-listing d-title, .layout-listing .d-title {
display: none;
}/* Styles for posts lists (not auto-injected) */
.posts-with-sidebar {
padding-left: 45px;
padding-right: 45px;
}.posts-list .description h2,
.posts-list .description p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
}.posts-list .description h2 {
font-weight: 700;
border-bottom: none;
padding-bottom: 0;
}.posts-list h2.post-tag {
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
padding-bottom: 12px;
}
.posts-list {
margin-top: 60px;
margin-bottom: 24px;
}.posts-list .post-preview {
text-decoration: none;
overflow: hidden;
display: block;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding: 24px 0;
}.post-preview-last {
border-bottom: none !important;
}.posts-list .posts-list-caption {
grid-column: screen;
font-weight: 400;
}.posts-list .post-preview h2 {
margin: 0 0 6px 0;
line-height: 1.2em;
font-style: normal;
font-size: 24px;
}.posts-list .post-preview p {
margin: 0 0 12px 0;
line-height: 1.4em;
font-size: 16px;
}.posts-list .post-preview .thumbnail {
box-sizing: border-box;
margin-bottom: 24px;
position: relative;
max-width: 500px;
}
.posts-list .post-preview img {
width: 100%;
display: block;
}.posts-list .metadata {
font-size: 12px;
line-height: 1.4em;
margin-bottom: 18px;
}.posts-list .metadata > * {
display: inline-block;
}.posts-list .metadata .publishedDate {
margin-right: 2em;
}.posts-list .metadata .dt-authors {
display: block;
margin-top: 0.3em;
margin-right: 2em;
}.posts-list .dt-tags {
display: block;
line-height: 1em;
}.posts-list .dt-tags .dt-tag {
display: inline-block;
color: rgba(0,0,0,0.6);
padding: 0.3em 0.4em;
margin-right: 0.2em;
margin-bottom: 0.4em;
font-size: 60%;
border: 1px solid rgba(0,0,0,0.2);
border-radius: 3px;
text-transform: uppercase;
font-weight: 500;
}.posts-list img {
opacity: 1;
}.posts-list img[data-src] {
opacity: 0;
}.posts-more {
clear: both;
}.posts-sidebar {
font-size: 16px;
}.posts-sidebar h3 {
font-size: 16px;
margin-top: 0;
margin-bottom: 0.5em;
font-weight: 400;
text-transform: uppercase;
}.sidebar-section {
margin-bottom: 30px;
}.categories ul {
list-style-type: none;
margin: 0;
padding: 0;
}.categories li {
color: rgba(0, 0, 0, 0.8);
margin-bottom: 0;
}.categories li>a {
border-bottom: none;
}.categories li>a:hover {
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}.categories .active {
font-weight: 600;
}.categories .category-count {
color: rgba(0, 0, 0, 0.4);
}@media(min-width: 768px) {
.posts-list .post-preview h2 {
font-size: 26px;
}
.posts-list .post-preview .thumbnail {
float: right;
width: 30%;
margin-bottom: 0;
}
.posts-list .post-preview .description {
float: left;
width: 45%;
}
.posts-list .post-preview .metadata {
float: left;
width: 20%;
margin-top: 8px;
}
.posts-list .post-preview p {
margin: 0 0 12px 0;
line-height: 1.5em;
font-size: 16px;
}
.posts-with-sidebar .posts-list {
float: left;
width: 75%;
}
.posts-with-sidebar .posts-sidebar {
float: right;
width: 20%;
margin-top: 60px;
padding-top: 24px;
padding-bottom: 24px;
}
}/* Improve display for browsers without grid (IE/Edge <= 15) */
.downlevel {
line-height: 1.6em;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
margin: 0;
}.downlevel .d-title {
padding-top: 6rem;
padding-bottom: 1.5rem;
}.downlevel .d-title h1 {
font-size: 50px;
font-weight: 700;
line-height: 1.1em;
margin: 0 0 0.5rem;
}.downlevel .d-title p {
font-weight: 300;
font-size: 1.2rem;
line-height: 1.55em;
margin-top: 0;
}.downlevel .d-byline {
padding-top: 0.8em;
padding-bottom: 0.8em;
font-size: 0.8rem;
line-height: 1.8em;
}.downlevel .section-separator {
border: none;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}.downlevel .d-article {
font-size: 1.06rem;
line-height: 1.7em;
padding-top: 1rem;
padding-bottom: 2rem;
}.downlevel .d-appendix {
padding-left: 0;
padding-right: 0;
max-width: none;
font-size: 0.8em;
line-height: 1.7em;
margin-bottom: 0;
color: rgba(0,0,0,0.5);
padding-top: 40px;
padding-bottom: 48px;
}.downlevel .footnotes ol {
padding-left: 13px;
}.downlevel .base-grid,
.downlevel .distill-header,
.downlevel .d-title,
.downlevel .d-abstract,
.downlevel .d-article,
.downlevel .d-appendix,
.downlevel .distill-appendix,
.downlevel .d-byline,
.downlevel .d-footnote-list,
.downlevel .d-citation-list,
.downlevel .distill-footer,
.downlevel .appendix-bottom,
.downlevel .posts-container {
padding-left: 40px;
padding-right: 40px;
}@media(min-width: 768px) {
.downlevel .base-grid,
.downlevel .distill-header,
.downlevel .d-title,
.downlevel .d-abstract,
.downlevel .d-article,
.downlevel .d-appendix,
.downlevel .distill-appendix,
.downlevel .d-byline,
.downlevel .d-footnote-list,
.downlevel .d-citation-list,
.downlevel .distill-footer,
.downlevel .appendix-bottom,
.downlevel .posts-container {
padding-left: 150px;
padding-right: 150px;
max-width: 900px;
}
}.downlevel pre code {
display: block;
border-left: 2px solid rgba(0, 0, 0, .1);
padding: 0 0 0 20px;
font-size: 14px;
}.downlevel code, .downlevel pre {
color: black;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}.downlevel .posts-list .post-preview {
color: inherit;
}
function is_downlevel_browser() {
if (bowser.isUnsupportedBrowser({ msie: "12", msedge: "16"},
window.navigator.userAgent)) {
return true;
} else {
return window.load_distill_framework === undefined;
}
}// show body when load is complete
function on_load_complete() {// add anchors
if (window.anchors) {
window.anchors.options.placement = 'left';
window.anchors.add('d-article > h2, d-article > h3, d-article > h4, d-article > h5');
}// set body to visible
document.body.style.visibility = 'visible';// force redraw for leaflet widgets
if (window.HTMLWidgets) {
var maps = window.HTMLWidgets.findAll(".leaflet");
$.each(maps, function(i, el) {
var map = this.getMap();
map.invalidateSize();
map.eachLayer(function(layer) {
if (layer instanceof L.TileLayer)
layer.redraw();
});
});
}// trigger 'shown' so htmlwidgets resize
$('d-article').trigger('shown');
}function init_distill() {
init_common();
// create front matter
var front_matter = $('<d-front-matter></d-front-matter>');
$('#distill-front-matter').wrap(front_matter);// create d-title
$('.d-title').changeElementType('d-title');// create d-byline
var byline = $('<d-byline></d-byline>');
$('.d-byline').replaceWith(byline);// create d-article
var article = $('<d-article></d-article>');
$('.d-article').wrap(article).children().unwrap();// move posts container into article
$('.posts-container').appendTo($('d-article'));// create d-appendix
$('.d-appendix').changeElementType('d-appendix');// flag indicating that we have appendix items
var appendix = $('.appendix-bottom').children('h3').length > 0;// replace footnotes with <d-footnote>
$('.footnote-ref').each(function(i, val) {
appendix = true;
var href = $(this).attr('href');
var id = href.replace('#', '');
var fn = $('#' + id);
var fn_p = $('#' + id + '>p');
fn_p.find('.footnote-back').remove();
var text = fn_p.html();
var dtfn = $('<d-footnote></d-footnote>');
dtfn.html(text);
$(this).replaceWith(dtfn);
});
// remove footnotes
$('.footnotes').remove();// move refs into #references-listing
$('#references-listing').replaceWith($('#refs'));$('h1.appendix, h2.appendix').each(function(i, val) {
$(this).changeElementType('h3');
});
$('h3.appendix').each(function(i, val) {
var id = $(this).attr('id');
$('.d-contents a[href="#' + id + '"]').parent().remove();
appendix = true;
$(this).nextUntil($('h1, h2, h3')).addBack().appendTo($('d-appendix'));
});// show d-appendix if we have appendix content
$("d-appendix").css('display', appendix ? 'grid' : 'none');// localize layout chunks to just output
$('.layout-chunk').each(function(i, val) {// capture layout
var layout = $(this).attr('data-layout');// apply layout to markdown level block elements
var elements = $(this).children().not('div.sourceCode, pre, script');
elements.each(function(i, el) {
var layout_div = $('<div class="' + layout + '"></div>');
if (layout_div.hasClass('shaded')) {
var shaded_content = $('<div class="shaded-content"></div>');
$(this).wrap(shaded_content);
$(this).parent().wrap(layout_div);
} else {
$(this).wrap(layout_div);
}
});// unwrap the layout-chunk div
$(this).children().unwrap();
});// remove code block used to force highlighting css
$('.distill-force-highlighting-css').parent().remove();// remove empty line numbers inserted by pandoc when using a
// custom syntax highlighting theme
$('code.sourceCode a:empty').remove();// load distill framework
load_distill_framework();// wait for window.distillRunlevel == 4 to do post processing
function distill_post_process() {if (!window.distillRunlevel || window.distillRunlevel < 4)
return;// hide author/affiliations entirely if we have no authors
var front_matter = JSON.parse($("#distill-front-matter").html());
var have_authors = front_matter.authors && front_matter.authors.length > 0;
if (!have_authors)
$('d-byline').addClass('hidden');// article with toc class
$('.d-contents').parent().addClass('d-article-with-toc');// strip links that point to #
$('.authors-affiliations').find('a[href="#"]').removeAttr('href');// add orcid ids
$('.authors-affiliations').find('.author').each(function(i, el) {
var orcid_id = front_matter.authors[i].orcidID;
if (orcid_id) {
var a = $('<a></a>');
a.attr('href', 'https://orcid.org/' + orcid_id);
var img = $('<img></img>');
img.addClass('orcid-id');
img.attr('alt', 'ORCID ID');
img.attr('src','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1N0NEMjA4MDI1MjA2ODExOTk0QzkzNTEzRjZEQTg1NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozM0NDOEJGNEZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozM0NDOEJGM0ZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZDN0YxMTc0MDcyMDY4MTE5NUZFRDc5MUM2MUUwNEREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU3Q0QyMDgwMjUyMDY4MTE5OTRDOTM1MTNGNkRBODU3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+84NovQAAAR1JREFUeNpiZEADy85ZJgCpeCB2QJM6AMQLo4yOL0AWZETSqACk1gOxAQN+cAGIA4EGPQBxmJA0nwdpjjQ8xqArmczw5tMHXAaALDgP1QMxAGqzAAPxQACqh4ER6uf5MBlkm0X4EGayMfMw/Pr7Bd2gRBZogMFBrv01hisv5jLsv9nLAPIOMnjy8RDDyYctyAbFM2EJbRQw+aAWw/LzVgx7b+cwCHKqMhjJFCBLOzAR6+lXX84xnHjYyqAo5IUizkRCwIENQQckGSDGY4TVgAPEaraQr2a4/24bSuoExcJCfAEJihXkWDj3ZAKy9EJGaEo8T0QSxkjSwORsCAuDQCD+QILmD1A9kECEZgxDaEZhICIzGcIyEyOl2RkgwAAhkmC+eAm0TAAAAABJRU5ErkJggg==');
a.append(img);
$(this).append(a);
}
});// hide elements of author/affiliations grid that have no value
function hide_byline_column(caption) {
$('d-byline').find('h3:contains("' + caption + '")').parent().css('visibility', 'hidden');
}// affiliations
var have_affiliations = false;
for (var i = 0; i<front_matter.authors.length; ++i) {
var author = front_matter.authors[i];
if (author.affiliation !== " ") {
have_affiliations = true;
break;
}
}
if (!have_affiliations)
$('d-byline').find('h3:contains("Affiliations")').css('visibility', 'hidden');// published date
if (!front_matter.publishedDate)
hide_byline_column("Published");// document object identifier
var doi = $('d-byline').find('h3:contains("DOI")');
var doi_p = doi.next().empty();
if (!front_matter.doi) {
// if we have a citation and valid citationText then link to that
if ($('#citation').length > 0 && front_matter.citationText) {
doi.html('Citation');
$('<a href="#citation"></a>')
.text(front_matter.citationText)
.appendTo(doi_p);
} else {
hide_byline_column("DOI");
}
} else {
$('<a></a>')
.attr('href', "https://doi.org/" + front_matter.doi)
.html(front_matter.doi)
.appendTo(doi_p);
}// change plural form of authors/affiliations
if (front_matter.authors.length === 1) {
var grid = $('.authors-affiliations');
grid.children('h3:contains("Authors")').text('Author');
grid.children('h3:contains("Affiliations")').text('Affiliation');
}// remove d-appendix and d-footnote-list local styles
$('d-appendix > style:first-child').remove();
$('d-footnote-list > style:first-child').remove();// move appendix-bottom entries to the bottom
$('.appendix-bottom').appendTo('d-appendix').children().unwrap();
$('.appendix-bottom').remove();// clear polling timer
clearInterval(tid);// show body now that everything is ready
on_load_complete();
}var tid = setInterval(distill_post_process, 50);
distill_post_process();}
function init_downlevel() {
init_common();
// insert hr after d-title
$('.d-title').after($('<hr class="section-separator"/>'));// check if we have authors
var front_matter = JSON.parse($("#distill-front-matter").html());
var have_authors = front_matter.authors && front_matter.authors.length > 0;// manage byline/border
if (!have_authors)
$('.d-byline').remove();
$('.d-byline').after($('<hr class="section-separator"/>'));
$('.d-byline a').remove();// remove toc
$('.d-contents').remove();// move appendix elements
$('h1.appendix, h2.appendix').each(function(i, val) {
$(this).changeElementType('h3');
});
$('h3.appendix').each(function(i, val) {
$(this).nextUntil($('h1, h2, h3')).addBack().appendTo($('.d-appendix'));
});// inject headers into references and footnotes
var refs_header = $('<h3></h3>');
refs_header.text('References');
$('#refs').prepend(refs_header);var footnotes_header = $('<h3></h3');
footnotes_header.text('Footnotes');
$('.footnotes').children('hr').first().replaceWith(footnotes_header);// move appendix-bottom entries to the bottom
$('.appendix-bottom').appendTo('.d-appendix').children().unwrap();
$('.appendix-bottom').remove();// remove appendix if it's empty
if ($('.d-appendix').children().length === 0)
$('.d-appendix').remove();// prepend separator above appendix
$('.d-appendix').before($('<hr class="section-separator" style="clear: both"/>'));// trim code
$('pre>code').each(function(i, val) {
$(this).html($.trim($(this).html()));
});// move posts-container right before article
$('.posts-container').insertBefore($('.d-article'));$('body').addClass('downlevel');
on_load_complete();
}function init_common() {
// jquery plugin to change element types
(function($) {
$.fn.changeElementType = function(newType) {
var attrs = {};$.each(this[0].attributes, function(idx, attr) {
attrs[attr.nodeName] = attr.nodeValue;
});this.replaceWith(function() {
return $("<" + newType + "/>", attrs).append($(this).contents());
});
};
})(jQuery);// prevent underline for linked images
$('a > img').parent().css({'border-bottom' : 'none'});// mark non-body figures created by knitr chunks as 100% width
$('.layout-chunk').each(function(i, val) {
var figures = $(this).find('img, .html-widget');
if ($(this).attr('data-layout') !== "l-body") {
figures.css('width', '100%');
} else {
figures.css('max-width', '100%');
figures.filter("[width]").each(function(i, val) {
var fig = $(this);
fig.css('width', fig.attr('width') + 'px');
});}
});// auto-append index.html to post-preview links in file: protocol
// and in rstudio ide preview
$('.post-preview').each(function(i, val) {
if (window.location.protocol === "file:")
$(this).attr('href', $(this).attr('href') + "index.html");
});// get rid of index.html references in header
if (window.location.protocol !== "file:") {
$('.distill-site-header a[href]').each(function(i,val) {
$(this).attr('href', $(this).attr('href').replace("index.html", "./"));
});
}// add class to pandoc style tables
$('tr.header').parent('thead').parent('table').addClass('pandoc-table');
$('.kable-table').children('table').addClass('pandoc-table');// add figcaption style to table captions
$('caption').parent('table').addClass("figcaption");// initialize posts list
if (window.init_posts_list)
window.init_posts_list();// implmement disqus comment link
$('.disqus-comment-count').click(function() {
window.headroom_prevent_pin = true;
$('#disqus_thread').toggleClass('hidden');
if (!$('#disqus_thread').hasClass('hidden')) {
var offset = $(this).offset();
$(window).resize();
$('html, body').animate({
scrollTop: offset.top - 35
});
}
});
}document.addEventListener('DOMContentLoaded', function() {
if (is_downlevel_browser())
init_downlevel();
else
window.addEventListener('WebComponentsReady', init_distill);
});
/* base variables *//* Edit the CSS properties in this file to create a custom
Distill theme. Only edit values in the right column
for each row; values shown are the CSS defaults.
To return any property to the default,
you may set its value to: unset
All rows must end with a semi-colon. *//* Optional: embed custom fonts here with `@import` */
/* This must remain at the top of this file. */html {
/*-- Main font sizes --*/
--title-size: 50px;
--body-size: 1.06rem;
--code-size: 14px;
--aside-size: 12px;
--fig-cap-size: 13px;
/*-- Main font colors --*/
--title-color: #000000;
--header-color: rgba(0, 0, 0, 0.8);
--body-color: rgba(0, 0, 0, 0.8);
--aside-color: rgba(0, 0, 0, 0.6);
--fig-cap-color: rgba(0, 0, 0, 0.6);
/*-- Specify custom fonts ~~~ must be imported above --*/
--heading-font: sans-serif;
--mono-font: monospace;
--body-font: sans-serif;
--navbar-font: sans-serif; /* websites + blogs only */
}/*-- ARTICLE METADATA --*/
d-byline {
--heading-size: 0.6rem;
--heading-color: rgba(0, 0, 0, 0.5);
--body-size: 0.8rem;
--body-color: rgba(0, 0, 0, 0.8);
}/*-- ARTICLE TABLE OF CONTENTS --*/
.d-contents {
--heading-size: 18px;
--contents-size: 13px;
}/*-- ARTICLE APPENDIX --*/
d-appendix {
--heading-size: 15px;
--heading-color: rgba(0, 0, 0, 0.65);
--text-size: 0.8em;
--text-color: rgba(0, 0, 0, 0.5);
}/*-- WEBSITE HEADER + FOOTER --*/
/* These properties only apply to Distill sites and blogs */.distill-site-header {
--title-size: 18px;
--text-color: rgba(255, 255, 255, 0.8);
--text-size: 15px;
--hover-color: white;
--bkgd-color: #0F2E3D;
}.distill-site-footer {
--text-color: rgba(255, 255, 255, 0.8);
--text-size: 15px;
--hover-color: white;
--bkgd-color: #0F2E3D;
}/*-- Additional custom styles --*/
/* Add any additional CSS rules below */
/* base variables *//* Edit the CSS properties in this file to create a custom
Distill theme. Only edit values in the right column
for each row; values shown are the CSS defaults.
To return any property to the default,
you may set its value to: unset
All rows must end with a semi-colon. *//* Optional: embed custom fonts here with `@import` */
/* This must remain at the top of this file. */html {
/*-- Main font sizes --*/
--title-size: 50px;
--body-size: 1.06rem;
--code-size: 14px;
--aside-size: 12px;
--fig-cap-size: 13px;
/*-- Main font colors --*/
--title-color: #000000;
--header-color: rgba(0, 0, 0, 0.8);
--body-color: rgba(0, 0, 0, 0.8);
--aside-color: rgba(0, 0, 0, 0.6);
--fig-cap-color: rgba(0, 0, 0, 0.6);
/*-- Specify custom fonts ~~~ must be imported above --*/
--heading-font: sans-serif;
--mono-font: monospace;
--body-font: sans-serif;
--navbar-font: sans-serif; /* websites + blogs only */
}/*-- ARTICLE METADATA --*/
d-byline {
--heading-size: 0.6rem;
--heading-color: rgba(0, 0, 0, 0.5);
--body-size: 0.8rem;
--body-color: rgba(0, 0, 0, 0.8);
}/*-- ARTICLE TABLE OF CONTENTS --*/
.d-contents {
--heading-size: 18px;
--contents-size: 13px;
}/*-- ARTICLE APPENDIX --*/
d-appendix {
--heading-size: 15px;
--heading-color: rgba(0, 0, 0, 0.65);
--text-size: 0.8em;
--text-color: rgba(0, 0, 0, 0.5);
}/*-- WEBSITE HEADER + FOOTER --*/
/* These properties only apply to Distill sites and blogs */.distill-site-header {
--title-size: 18px;
--text-color: rgba(255, 255, 255, 0.8);
--text-size: 15px;
--hover-color: white;
--bkgd-color: #0F2E3D;
}.distill-site-footer {
--text-color: rgba(255, 255, 255, 0.8);
--text-size: 15px;
--hover-color: white;
--bkgd-color: #0F2E3D;
}/*-- Additional custom styles --*/
/* Add any additional CSS rules below */
@import url('https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css')
/* base style *//* FONT FAMILIES */
:root {
--heading-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
--mono-default: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
--body-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
}body,
.posts-list .post-preview p,
.posts-list .description p {
font-family: var(--body-font), var(--body-default);
}h1, h2, h3, h4, h5, h6,
.posts-list .post-preview h2,
.posts-list .description h2 {
font-family: var(--heading-font), var(--heading-default);
}d-article div.sourceCode code,
d-article pre code {
font-family: var(--mono-font), var(--mono-default);
}/*-- TITLE --*/
d-title h1,
.posts-list > h1 {
color: var(--title-color, black);
}d-title h1 {
font-size: var(--title-size, 50px);
}/*-- HEADERS --*/
d-article h1,
d-article h2,
d-article h3,
d-article h4,
d-article h5,
d-article h6 {
color: var(--header-color, rgba(0, 0, 0, 0.8));
}/*-- BODY --*/
/* only text inside of <p> tags */
d-article > p {
color: var(--body-color, rgba(0, 0, 0, 0.8));
font-size: var(--body-size, 1.06rem);
}/*-- CODE --*/
d-article div.sourceCode code,
d-article pre code {
font-size: var(--code-size, 14px);
}/*-- ASIDE --*/
d-article aside {
font-size: var(--aside-size, 12px);
color: var(--aside-color, rgba(0, 0, 0, 0.6));
}/*-- FIGURE CAPTIONS --*/
figure .caption,
figure figcaption,
.figure .caption {
font-size: var(--fig-cap-size, 13px);
color: var(--fig-cap-color, rgba(0, 0, 0, 0.6));
}/*-- METADATA --*/
d-byline h3 {
font-size: var(--heading-size, 0.6rem);
color: var(--heading-color, rgba(0, 0, 0, 0.5));
}d-byline {
font-size: var(--body-size, 0.8rem);
color: var(--body-color, rgba(0, 0, 0, 0.8));
}d-byline a,
d-article d-byline a {
color: var(--body-color, rgba(0, 0, 0, 0.8));
}/*-- TABLE OF CONTENTS --*/
.d-contents nav h3 {
font-size: var(--heading-size, 18px);
}.d-contents nav a {
font-size: var(--contents-size, 13px);
}/*-- APPENDIX --*/
d-appendix h3 {
font-size: var(--heading-size, 15px);
color: var(--heading-color, rgba(0, 0, 0, 0.65));
}d-appendix {
font-size: var(--text-size, 0.8em);
color: var(--text-color, rgba(0, 0, 0, 0.5));
}d-appendix d-footnote-list a.footnote-backlink {
color: var(--text-color, rgba(0, 0, 0, 0.5));
}/*-- WEBSITE HEADER + FOOTER --*/
.distill-site-header .title {
font-size: var(--title-size, 18px);
font-family: var(--navbar-font), var(--heading-default);
}.distill-site-header a,
.nav-dropdown .nav-dropbtn {
font-family: var(--navbar-font), var(--heading-default);
}.distill-site-header a:hover {
color: var(--hover-color, white);
}.distill-site-header {
font-size: var(--text-size, 15px);
color: var(--text-color, rgba(255, 255, 255, 0.8));
background-color: var(--bkgd-color, #0F2E3D);
}.distill-site-footer {
font-size: var(--text-size, 15px);
color: var(--text-color, rgba(255, 255, 255, 0.8));
background-color: var(--bkgd-color, #0F2E3D);
}.distill-site-footer a:hover {
color: var(--hover-color, white);
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-186284914-4');
{"title":"Untitled","authors":[]}
README.utf8
Contents
Estatística com R
Disciplina de Estatística da UNINOVE
Disciplina do Mestrado e Doutorado da UNINOVE. O conteúdo todo consegue ser acessado num formato interativo aqui.
Professor
Prof. Dr. José Eduardo Storopoli - Currículo Lattes - ORCID - [email protected]
Prof. Dr. Leonardo Vils - Currículo Lattes - ORCID - [email protected]Como usar esse conteúdo?
Este conteúdo possui licença livre para uso. Caso queira utilizar o conteúdo para um curso ou estudos, por favor colabore nesse repositório quaisquer aprimorações que foram realizadas.
Para configurar um ambiente local:
- Clone o repositório do GitHub:
git clone https://github.com/storopoli/Estatistica.git
- Acesse o diretório:
cd Estatistica
- Instale os pacotes necessários:
Rscript install.R
Para usar na RStudio na nuvem gratuito
Por que R?
R é uma linguagem criada por estatísticos para estatísticos. Possui um vasto ecossistema de bibliotecas e é amplamente usado na ciência e em especial nas ciências aplicadas. Fizemos toda uma argumentação de porque você deve usar R aqui
Aulas
Conteúdos Principais
- Comandos Básicos de R
\(p\)-Valores, Hipóteses Nula e Pressupostos- Teste de Hipóteses e Teste \(t\)
- Análise de Variância (ANOVA)
- Correlações
- Regressão Linear
- Regressão Logística
Conteúdos Auxiliares
- Quarteto de Anscombe
- Dados Faltantes
- Tamanho de Amostra e Tamanho de Efeito
- Tabelas para Publicação
Referências
Livros
- Dancey, Christine P.; Reidy, John; Viali, Lori (2013): Estatística sem matemática para psicologia. 5. ed. Porto Alegre, RS: Penso.
- Hair, Joseph F.; Sant’Anna, Adonai Schlup; Gouvêa, Maria Aparecida (2009): Análise multivariada de dados. 6. ed. Porto Alegre: Bookman.
- Levin, Jack; Fox, James Alan; Forde, David R.; Ritter, Jorge; Bonafini, Fernanda (2014, 2012): Estatística para ciências humanas. 11. ed. São Paulo: Pearson Education do Brasil.
- Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). L. Erlbaum Associates.
Artigos
Básicos
- Ioannidis, J. P. A. (2005). Why most published research findings are false. PLoS Medicine, 2(8), e124.
- Ioannidis, J. P. A. (2019). What Have We (Not) Learnt from Millions of Scientific Papers with P Values? The American Statistician, 73(sup1), 20–25. https://doi.org/10.1080/00031305.2018.1447512
- Cassidy, S. A., Dimova, R., Giguère, B., Spence, J. R., & Stanley, D. J. (2019). Failing Grade: 89% of Introduction-to-Psychology Textbooks That Define or Explain Statistical Significance Do So Incorrectly. Advances in Methods and Practices in Psychological Science, 2(3), 233–239. https://doi.org/10.1177/2515245919858072
- Smaldino, P. (n.d.). How to translate a verbal theory into a formal model. https://doi.org/10.31222/OSF.IO/N7QSH
- Cumming, G. (2014). The New Statistics: Why and How. Psychological Science, 25(1), 7–29. https://doi.org/10.1177/0956797613504966
- Bedeian, A. G. (2014). “More than meets the eye”: A guide to interpreting the descriptive statistics and correlation matrices reported in management research. Academy of Management Learning and Education, 13(1), 121–135. https://doi.org/10.5465/amle.2013.0001
- Murphy, K. R., & Aguinis, H. (2019). HARKing: How Badly Can Cherry-Picking and Question Trolling Produce Bias in Published Results? Journal of Business and Psychology, 34(1). https://doi.org/10.1007/s10869-017-9524-7
- Wasserstein, R. L., & Lazar, N. A. (2016). The ASA’s Statement on p-Values: Context, Process, and Purpose. American Statistician, 70(2), 129–133. https://doi.org/10.1080/00031305.2016.1154108
- Greenland, S., Senn, S. J., Rothman, K. J., Carlin, J. B., Poole, C., Goodman, S. N., & Altman, D. G. (2016). Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. European Journal of Epidemiology, 31(4), 337–350. https://doi.org/10.1007/s10654-016-0149-3
- Smaldino, P. E. (2017). Models Are Stupid, and We Need More of Them. In Computational Social Psychology (Issue March, pp. 311–331). Routledge. https://doi.org/10.4324/9781315173726-14
- Stark, P. B., & Saltelli, A. (2018). Cargo-cult statistics and scientific crisis. Significance, 15(4), 40–43. https://doi.org/10.1111/j.1740-9713.2018.01174.x
- Kerr, N. L. (1998). HARKing: Hypothesizing after the results are known. Personality and Social Psychology Review, 2(3), 196–217. https://doi.org/10.1207/s15327957pspr0203_4
- Whetten, D. A. (2009). Modeling theoretical propositions. In Designing research for publication (pp. 217–250).
Complementares
- Etz, A. (2019). Technical Notes on Kullback-Leibler Divergence. https://doi.org/10.31234/OSF.IO/5VHZU
- Pearl, J. (2014). Comment: Understanding Simpson’s Paradox. The American Statistician, 68(1), 8–13. https://doi.org/10.1080/00031305.2014.876829
- Gelman, A., & Vehtari, A. (2020). What are the most important statistical ideas of the past 50 years? https://arxiv.org/abs/2012.00174
- Aguinis, H., Edwards, J. R., & Bradley, K. J. (2017). Improving Our Understanding of Moderation and Mediation in Strategic Management Research. Organizational Research Methods, 20(4), 665–685. https://doi.org/10.1177/1094428115627498
- Aguinis, H., Gottfredson, R. K., & Joo, H. (2013). Best-Practice Recommendations for Defining, Identifying, and Handling Outliers. In Organizational Research Methods (Vol. 16, Issue 2, pp. 270–301). https://doi.org/10.1177/1094428112470848
- Wilson, G., Bryan, J., Cranston, K., Kitzes, J., Nederbragt, L., & Teal, T. K. (2017). Good enough practices in scientific computing. PLOS Computational Biology, 13(6), e1005510. https://doi.org/10.1371/journal.pcbi.1005510
- Tierney, N. J., & Ram, K. (2020). A Realistic Guide to Making Data Available Alongside Code to Improve Reproducibility. https://arxiv.org/abs/2002.11626
Como citar esse conteúdo
Para citar o conteúdo use:
Storopoli & Vils (2021, Jan. 11). Estatística com R. Retrieved from https://storopoli.io/Estatistica
Ou em formato BibTeX para LaTeX:
@misc{storopoli2021estatisticaR,
author = {Storopoli, Jose and Vils, Leonardo},
title = {Estatística com R},
url = {https://storopoli.io/Estatistica},
year = {2021}
}(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();Corrections
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Reuse
Text and figures are licensed under Creative Commons Attribution CC BY-SA 4.0. Source code is available at https://github.com/storopoli/Rcpp, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".