Skip to content

Commit

Permalink
update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkang committed May 7, 2024
1 parent 042b0d5 commit a464032
Show file tree
Hide file tree
Showing 31 changed files with 991 additions and 693 deletions.
3 changes: 2 additions & 1 deletion .Rprofile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
options(repos = c(CRAN = "https://packagemanager.posit.co/all/__linux__/jammy/latest"))
# Sys.getenv("R_LIBS_USER")

# .libPaths(c( Sys.getenv("R_LIBS_USER") , .libPaths()))
# .libPaths(Sys.getenv("R_LIBS_USER"))
R_LIBS_SITE=Sys.getenv("R_LIBS_USER") # Install packages on local user library
options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/jammy/latest"))
options(repos = c(CRAN = "https://packagemanager.posit.co/all/__linux__/jammy/latest"))

# TO avoid error: Error: Input files not all in same directory, please supply
# explicit wd
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: jsPsychR
Title: Create experimental paradigms with jsPsych, simulate participants and standardize the data preparation and analysis
Version: 0.2.7
Date: 2023-09-11
Version: 0.3.5.900
Date: 2024-05-07
Authors@R:
c(person("Gorka", "Navarrete", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7678-8656")),
person("Herman", "Valencia", email = "[email protected]", role = c("aut"), comment = c(ORCID = "")))
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ We have three main tools:
- [jsPsychHelpeR](https://github.com/gorkang/jsPsychHelpeR): Standardize and automatize data preparation, analysis and reporting of [jsPsych](https://www.jspsych.org/) experiments created with [jsPsychMaker](#jsPsychMaker)

![](img/jsPsych-trinity.png)


## How to cite jsPSychR

Navarrete, G., & Valencia, H. (2023). Create experimental paradigms with jsPsych: Simulate Participants and Standardize the Data Preparation and Analysis, 1, 73. https://gorkang.github.io/jsPsychRmanual/, 10.5281/zenodo.8296995
75 changes: 44 additions & 31 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.515">
<meta name="generator" content="quarto-1.4.553">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="author" content="Gorka Navarrete">
<meta name="dcterms.date" content="2023-12-04">
<meta name="dcterms.date" content="2024-05-01">

<title>jsPsychR manual</title>
<style>
Expand Down Expand Up @@ -63,6 +63,7 @@
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-text-placeholder": "",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
Expand Down Expand Up @@ -226,7 +227,7 @@ <h1 class="title">jsPsychR manual</h1>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">December 4, 2023</p>
<p class="date">May 1, 2024</p>
</div>
</div>

Expand Down Expand Up @@ -287,7 +288,7 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
<p>So far, the following papers using jsPsychR have been published or submitted:</p>
<ul>
<li><p>Neely-Prado, A., van Elk, M., Navarrete, G., Hola, F., &amp; Huepe, D. (2021). Social Adaptation in Context: The Differential Role of Religiosity and Self-Esteem in Vulnerable vs.&nbsp;Non-vulnerable Populations–A Registered Report Study. Frontiers in Psychology, 12, 5257. <a href="https://doi.org/10.3389/fpsyg.2021.519623">https://doi.org/10.3389/fpsyg.2021.519623</a></p></li>
<li><p>Juan-Pablo Morales, Brenda E. Ryan, Vince Polito, Gorka Navarrete, Mayte Vergara, David Huepe. (Submitted). Can beliefs improve mental health? A dive into resilience during pandemic times in South America</p></li>
<li><p>Morales, Juan Pablo and Ryan, Brenda and Polito, Vince and Vergara, Mayte and Navarrete, Gorka and Huepe, David, Can Beliefs Improve Mental Health? A Dive into Resilience During Pandemic Times in South America. <a href="http://dx.doi.org/10.2139/ssrn.4634882">http://dx.doi.org/10.2139/ssrn.4634882</a></p></li>
</ul>


Expand Down Expand Up @@ -374,6 +375,24 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -408,7 +427,11 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand All @@ -423,27 +446,6 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
Expand All @@ -458,10 +460,14 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
break;
}
}
typesetMath(container);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
typesetMath(note);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
Expand All @@ -470,8 +476,15 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
Expand Down Expand Up @@ -696,7 +709,7 @@ <h2 class="anchored" data-anchor-id="papers-published-using-jspsychr">Papers pub
<div class="nav-page nav-page-previous">
</div>
<div class="nav-page nav-page-next">
<a href="./qmd/01-intro.html" class="pagination-link" aria-label="<span class='chapter-number'>1</span>&nbsp; <span class='chapter-title'>Reproducible experiments</span>">
<a href="./qmd/01-intro.html" class="pagination-link" aria-label="Reproducible experiments">
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Reproducible experiments</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
Binary file modified docs/jsPsychR-manual.pdf
Binary file not shown.
71 changes: 42 additions & 29 deletions docs/qmd/01-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.515">
<meta name="generator" content="quarto-1.4.553">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -82,6 +82,7 @@
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-text-placeholder": "",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
Expand Down Expand Up @@ -363,6 +364,24 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -397,7 +416,11 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand All @@ -412,27 +435,6 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
Expand All @@ -447,10 +449,14 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
break;
}
}
typesetMath(container);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
typesetMath(note);
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
Expand All @@ -459,8 +465,15 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
// TODO in 1.5, we should make sure this works without a callout special case
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
Expand Down Expand Up @@ -683,12 +696,12 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="automatization"><span cla
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="../index.html" class="pagination-link aria-label=" what="" is="" jspsychr?"="">
<a href="../index.html" class="pagination-link" aria-label="What is jsPsychR?">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">What is jsPsychR?</span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="../qmd/02-QuickGuide.html" class="pagination-link" aria-label="<span class='chapter-number'>2</span>&nbsp; <span class='chapter-title'>Quick Guide</span>">
<a href="../qmd/02-QuickGuide.html" class="pagination-link" aria-label="Quick Guide">
<span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Quick Guide</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
Loading

0 comments on commit a464032

Please sign in to comment.