From 4f044a018b8bca260ee65fb8370a4e9c41a81cdd Mon Sep 17 00:00:00 2001 From: "Pascal J. Kieslich" Date: Wed, 10 Jan 2024 13:05:43 +0100 Subject: [PATCH] Update online documentation --- docs/404.html | 119 ++++------- docs/LICENSE-text.html | 109 ++-------- docs/authors.html | 144 ++++--------- docs/index.html | 97 ++++----- docs/news/index.html | 178 +++++----------- docs/pkgdown.css | 87 ++++---- docs/pkgdown.js | 4 +- docs/pkgdown.yml | 8 +- docs/reference/Rplot001.png | Bin 0 -> 1011 bytes docs/reference/index.html | 155 +++----------- docs/reference/read_bulk.html | 313 ++++++++++++---------------- docs/reference/read_opensesame.html | 280 ++++++++++--------------- docs/sitemap.xml | 30 +++ 13 files changed, 542 insertions(+), 982 deletions(-) create mode 100644 docs/reference/Rplot001.png create mode 100644 docs/sitemap.xml diff --git a/docs/404.html b/docs/404.html index f9cb1b7..7233801 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,66 +1,27 @@ - - - - + + + + - Page not found (404) • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - -
-
- + +
+ + + - - -
+
+
-
- +
+ + - - diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 6150ccb..ef0a1e1 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -1,66 +1,12 @@ - - - - - - - -License • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -License • readbulk + + - - - - -
-
- -
- -
+
+
-
- +
- - + + diff --git a/docs/authors.html b/docs/authors.html index 4883549..bccee28 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,66 +1,12 @@ - - - - - - - -Citation and Authors • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • readbulk - + + - - - -
-
- -
- -
+
-
-
- +
- - + + diff --git a/docs/index.html b/docs/index.html index 8000edf..adc1c4b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -23,6 +23,8 @@ + +
-
- - +
+ +

cran version DOI downloads

readbulk is an R package that facilitates loading multiple data files with a similar structure and combining them into a single data.frame, using the read_bulk function. It wraps most common R functions for reading data, retaining the flexiblity of the available tools.

-

For (experimental) psychologists, the package provides the read_opensesame function which wraps the above, providing the appropriate defaults for loading the many files created by OpenSesame.

-
-

-General Information

+

For (experimental) psychologists, the package provides the read_opensesame function which wraps the above, providing the appropriate defaults for loading the many files created by OpenSesame.

+
+

General Information +

The readbulk package was developed by Pascal Kieslich, with contributions by Felix Henninger. It is published under the GNU General Public License (version 3).

-

An overview of the functions in this package can be found online. Please see news for a summary of changes in the package.

+

An overview of the functions in this package can be found online. Please see news for a summary of changes in the package.

-
-

-Installation

-

The current stable version is available on CRAN and can be installed via install.packages("readbulk").

+
+

Installation +

+

The current stable version is available on CRAN and can be installed via install.packages("readbulk").

-
-

-Citation

+
+

Citation +

If you would like to cite the readbulk package in your published research, you can cite is as follows:

-

Kieslich, P. J., & Henninger, F. (2016). Readbulk: An R package for reading and combining multiple data files. https://doi.org/10.5281/zenodo.596649

+

Kieslich, P. J., & Henninger, F. (2016). Readbulk: An R package for reading and combining multiple data files. https://doi.org/10.5281/zenodo.596649

+ + +
-

Site built with pkgdown 1.5.1.

+

+

Site built with pkgdown 2.0.7.

@@ -157,5 +150,7 @@

Dev status

+ + diff --git a/docs/news/index.html b/docs/news/index.html index 6b11b4d..a8f68be 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,66 +1,12 @@ - - - - - - - -Changelog • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Changelog • readbulk - - + + - - -
-
- -
- -
+
-
-

-readbulk 1.1.3 2020-08-25 -

-
    -
  • Updated package description and documentation
  • -
-
-
-

-readbulk 1.1.2 2019-02-02 -

-
    -
  • Improved speed of read_bulk and read_opensesame by binding data together only once (for every subdirectory)
  • -
-
-
-

-readbulk 1.1.1 Unreleased -

-
    -
  • Online documentation added using the pkgdown package - it can be found at http://pascalkieslich.github.io/readbulk/ +
    + +
    • +read_bulk: Introduced name_contains argument, an optional character string. If specified, only files whose name contains this string will be merged.
    • +
    • +read_bulk: Introduced name_filter argument, an optional regular expression. If specified, only files whose name matches this regular expression will be merged.
    • +
    +
    + +
    • Updated package description and documentation
    • +
    +
    + +
    • Improved speed of read_bulk and read_opensesame by binding data together only once (for every subdirectory)
    • +
    +
    + +
    • Online documentation added using the pkgdown package - it can be found at http://pascalkieslich.github.io/readbulk/
    • As this release does not include any changes in the code or the function documentation, no new version was released on CRAN
    • -
    -
    -
    -

    -readbulk 1.1.0 2016-10-25 -

    -
      -
    • Introduced verbose argument so users can decide whether read_bulk and read_opensesame report its progress or not
    • -
    -
    -
    -

    -readbulk 1.0.0 2016-02-14 -

    -
      -
    • First release
    • -
    -
    +
+
+ +
  • Introduced verbose argument so users can decide whether read_bulk and read_opensesame report its progress or not
  • +
+
+ +
  • First release
  • +
+
-
- +
- - + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index c01e592..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -244,14 +243,14 @@ nav[data-toggle='toc'] .nav .nav > .active:focus > a { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4a8bb74..4f540cd 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,6 @@ -pandoc: 2.7.3 -pkgdown: 1.5.1 +pandoc: 3.1.1 +pkgdown: 2.0.7 pkgdown_sha: ~ -articles: [] -last_built: 2020-08-27T07:07Z +articles: {} +last_built: 2024-01-10T12:01Z diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000000000000000000000000000000000000..17a358060aed2a86950757bbd25c6f92c08c458f GIT binary patch literal 1011 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0x7m6Z+90U4Fo@(ch>_c&H|6f zVg?3oArNM~bhqvg0|WD9PZ!6KiaBo&GBN^{G%5UFpXcEKVvd5*5Eu=C0SJK)8A6*F U7`aXvEC5;V>FVdQ&MBb@00SN#Z2$lO literal 0 HcmV?d00001 diff --git a/docs/reference/index.html b/docs/reference/index.html index 61bea49..c1c0887 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,66 +1,12 @@ - - - - - - - -Function reference • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • readbulk - + + - - - -
-
- -
- -
+
- - - - - - - - - - -
-

General function

+ - - - - - - - - - - - - - - - - - - - - - - - - -
+

General function

+

read_bulk()

Read and combine multiple data files

-

OpenSesame specific function

+
+

OpenSesame specific function

+

read_opensesame()

Read and combine raw OpenSesame data

- +
+
-
- +
- - + + diff --git a/docs/reference/read_bulk.html b/docs/reference/read_bulk.html index 475604c..d1b781c 100644 --- a/docs/reference/read_bulk.html +++ b/docs/reference/read_bulk.html @@ -1,68 +1,13 @@ - - - - - - - -Read and combine multiple data files — read_bulk • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Read and combine multiple data files — read_bulk • readbulk - - - - + + -
-
- -
- -
+

Read and combine multiple data files. The files will be merged into one -data.frame.

+data.frame.

+
+ +
+
read_bulk(
+  directory = ".",
+  subdirectories = FALSE,
+  name_contains = NULL,
+  name_filter = NULL,
+  extension = NULL,
+  data = NULL,
+  verbose = TRUE,
+  fun = utils::read.csv,
+  ...
+)
-
read_bulk(
-  directory = ".",
-  subdirectories = FALSE,
-  extension = NULL,
-  data = NULL,
-  verbose = TRUE,
-  fun = utils::read.csv,
-  ...
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
directory

a character string. Name of the folder where the raw data +

+

Arguments

+
directory
+

a character string. Name of the folder where the raw data are stored. If it does not contain an absolute path, the file name is relative to the current working directory. Defaults to current working -directory.

subdirectories

logical indicating whether the directory contains +directory.

+ + +
subdirectories
+

logical indicating whether the directory contains subdirectories. If FALSE (the default), it is assumed that all raw data files are directly included in the directory. If TRUE, it is assumed that the raw data files are stored in folders within the directory. -Alternatively, a vector of folder names that contain the raw data.

extension

an optional character string. If specified, only files -ending with the specified extension will be merged.

data

A data.frame to which the new data will be added. This is -optional, and an empty data.frame is used if none is provided.

verbose

logical indicating whether function should report its -progress.

fun

the function used for reading the individual files. By default, -this is read.csv. Can be any data import function as long as it -takes the file name as first argument.

...

additional arguments passed on to fun.

- -

Value

- -

A data.frame containing the merged data.

+Alternatively, a vector of folder names that contain the raw data.

+ + +
name_contains
+

an optional character string. If specified, only files +whose name contains this string will be merged.

+ + +
name_filter
+

an optional regular expression. If specified, only files +whose name matches this regular expression will be merged.

+ + +
extension
+

an optional character string. If specified, only files +ending with the specified extension will be merged.

+ + +
data
+

A data.frame to which the new data will be added. This is +optional, and an empty data.frame is used if none is provided.

+ + +
verbose
+

logical indicating whether function should report its +progress.

+ + +
fun
+

the function used for reading the individual files. By default, +this is read.csv. Can be any data import function as long as it +takes the file name as first argument.

+ + +
...
+

additional arguments passed on to fun.

+ +
+
+

Value

+ + +

A data.frame containing the merged data.

+ +

One column in the data.frame (File) contains the name of the raw data file. If the subdirectories option is set, an additional column (Subdirectory) with the name of the subdirectory is added.

-

Details

- +
+
+

Details

read_bulk provides a wrapper around a specific data import function -(read.csv by default) to load the individual data files. After -loading, the different data files are merged using rbind.fill. +(read.csv by default) to load the individual data files. After +loading, the different data files are merged using rbind.fill. This function can deal with varying column names across files, and still places data into the appropriate columns. If a column is not present in a specific file, it will be filled with NA.

-

See also

- -

read.table for reading individual data files.

-

rbind.fill is responsible for merging files.

-

write.table for data export.

- -

Examples

-
if (FALSE) { -# Merge all files in the main folder "raw_data" -# (which is in the current working directory) -raw_data <- read_bulk(directory = "raw_data") - -# Merge files with file extension ".csv" -raw_data <- read_bulk(directory = "raw_data", - extension = ".csv") - -# Merge all files stored in separate folders -# within the folder "raw_data" -raw_data <- read_bulk(directory = "raw_data", - subdirectories = TRUE) - -# Merge all raw data stored in the folders "Session1" -# and "Session2" within the folder "raw_data" -raw_data <- read_bulk(directory = "raw_data", - subdirectories = c("Session1","Session2")) - -# Merge tab separated data files and prevent -# character vectors from being converted to factors -raw_data <- read_bulk(directory = "raw_data", - fun=read.delim,stringsAsFactors=FALSE) -}
+
+
+

See also

+

read.table for reading individual data files.

+

rbind.fill is responsible for merging files.

+

write.table for data export.

+
+ +
+

Examples

+
if (FALSE) {
+# Merge all files in the main folder "raw_data"
+# (which is in the current working directory)
+raw_data <- read_bulk(directory = "raw_data")
+
+# Merge files with file extension ".csv"
+raw_data <- read_bulk(directory = "raw_data",
+  extension = ".csv")
+
+# Merge all files stored in separate folders
+# within the folder "raw_data"
+raw_data <- read_bulk(directory = "raw_data",
+  subdirectories = TRUE)
+
+# Merge all raw data stored in the folders "Session1"
+# and "Session2" within the folder "raw_data"
+raw_data <- read_bulk(directory = "raw_data",
+  subdirectories = c("Session1","Session2"))
+
+# Merge tab separated data files and prevent
+# character vectors from being converted to factors
+raw_data <- read_bulk(directory = "raw_data",
+  fun=read.delim,stringsAsFactors=FALSE)
+}
+
+
+
-
- +
- - + + diff --git a/docs/reference/read_opensesame.html b/docs/reference/read_opensesame.html index af4ae9c..01aae25 100644 --- a/docs/reference/read_opensesame.html +++ b/docs/reference/read_opensesame.html @@ -1,69 +1,14 @@ - - - - - - - -Read and combine raw OpenSesame data — read_opensesame • readbulk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Read and combine raw OpenSesame data — read_opensesame • readbulk - - - - - - - - - - + + - - - -
-
- -
- -
+

Read and combine multiple raw data files that were collected with OpenSesame (Mathot, Schreij, & Theeuwes, 2012). The files will be merged into one -data.frame.

+data.frame.

+
+ +
+
read_opensesame(
+  directory = ".",
+  subdirectories = FALSE,
+  extension = NULL,
+  data = NULL,
+  verbose = TRUE
+)
-
read_opensesame(
-  directory = ".",
-  subdirectories = FALSE,
-  extension = NULL,
-  data = NULL,
-  verbose = TRUE
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - -
directory

a character string. Name of the folder where the raw data +

+

Arguments

+
directory
+

a character string. Name of the folder where the raw data are stored. If it does not contain an absolute path, the file name is relative to the current working directory. Defaults to current working -directory.

subdirectories

logical indicating whether the directory contains +directory.

+ + +
subdirectories
+

logical indicating whether the directory contains subdirectories. If FALSE (the default), it is assumed that all raw data files are directly included in the directory. If TRUE, it is assumed that the raw data files are stored in folders within the directory. -Alternatively, a vector of folder names that contain the raw data.

extension

an optional character string. If specified, only files -ending with the specified extension will be merged.

data

A data.frame to which the new data will be added. This is -optional, and an empty data.frame is used if none is provided.

verbose

logical indicating whether function should report its -progress.

- -

Value

- -

A data.frame containing the merged raw data.

+Alternatively, a vector of folder names that contain the raw data.

+ + +
extension
+

an optional character string. If specified, only files +ending with the specified extension will be merged.

+ + +
data
+

A data.frame to which the new data will be added. This is +optional, and an empty data.frame is used if none is provided.

+ + +
verbose
+

logical indicating whether function should report its +progress.

+ +
+
+

Value

+ + +

A data.frame containing the merged raw data.

+ +

One column in the data.frame (File) contains the name of the raw data file. If the subdirectories option is set, an additional column (Subdirectory) with the name of the subdirectory is added.

-

Details

- +
+
+

Details

OpenSesame generally produces an output .csv file for each participant in the experiment. This is handy during data collection, but for the analysis it is often useful to combine many such files into a single data.frame. This is the single task of the read_opensesame function, which loads all files from a given directory and attempts to combine them into a data.frame.

-

read_opensesame provides a wrapper around read_bulk to load the +

read_opensesame provides a wrapper around read_bulk to load the raw data files. After loading, the different data files are merged using -rbind.fill. This function can deal with varying column names +rbind.fill. This function can deal with varying column names across files, and still places data into the appropriate columns. If a column is not present in a specific file, it will be filled with NA.

-

References

- +
+
+

References

Mathot, S., Schreij, D., & Theeuwes, J. (2012). OpenSesame: An open-source, graphical experiment builder for the social sciences. Behavior Research Methods, 44(2), 314-324.

-

See also

- -

read_bulk for reading and combining multiple data files +

+
+

See also

+

read_bulk for reading and combining multiple data files that have other file formats.

+
-

Examples

-
if (FALSE) { -# Read single raw data file from OpenSesame -raw_data <- utils::read.csv("raw_data/subject-1.csv",encoding = "UTF-8") - -# Merge all files in the main folder "raw_data" -# (which is in the current working directory) -raw_data <- read_opensesame(directory = "raw_data") - -# Merge files with file extension ".csv" -raw_data <- read_opensesame(directory = "raw_data", - extension = ".csv") - -# Merge all files stored in separate folders -# within the folder "raw_data" -raw_data <- read_opensesame(directory = "raw_data", - subdirectories = TRUE) - -# Merge all raw data stored in the folders "Session1" -# and "Session2" within the folder "raw_data" -raw_data <- read_opensesame(directory = "raw_data", - subdirectories = c("Session1","Session2")) - -# Export merged data to a file using write.table -write.table(raw_data, file = "raw_data.csv", - sep=",", row.names = FALSE) -}
+
+

Examples

+
if (FALSE) {
+# Read single raw data file from OpenSesame
+raw_data <- utils::read.csv("raw_data/subject-1.csv",encoding = "UTF-8")
+
+# Merge all files in the main folder "raw_data"
+# (which is in the current working directory)
+raw_data <- read_opensesame(directory = "raw_data")
+
+# Merge files with file extension ".csv"
+raw_data <- read_opensesame(directory = "raw_data",
+  extension = ".csv")
+
+# Merge all files stored in separate folders
+# within the folder "raw_data"
+raw_data <- read_opensesame(directory = "raw_data",
+  subdirectories = TRUE)
+
+# Merge all raw data stored in the folders "Session1"
+# and "Session2" within the folder "raw_data"
+raw_data <- read_opensesame(directory = "raw_data",
+  subdirectories = c("Session1","Session2"))
+
+# Export merged data to a file using write.table
+write.table(raw_data, file = "raw_data.csv",
+  sep=",", row.names = FALSE)
+}
+
+
+
-
- +
- - + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..1099151 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,30 @@ + + + + /404.html + + + /authors.html + + + /index.html + + + /LICENSE-text.html + + + /news/index.html + + + /reference/index.html + + + /reference/process_labjs.html + + + /reference/read_bulk.html + + + /reference/read_opensesame.html + +