datavyu_search: Scans a directory for datavyur exported '.csv' data.

Description Usage Arguments Details Value Examples

View source: R/exported.R

Description

The function will find data exported from .opf to .csv using the built-in Ruby script.

Usage

1
2
3
4
5
6
datavyu_search(
  columns = NULL,
  files = NULL,
  folder = getOption("datavyur.folder"),
  traverse = TRUE
)

Arguments

columns

Similar to the files argument. The name of the Datavyu "column" to import, as used in the original datavyu .opf file.

files

The short name of the Datavyu "file" to import, as used for the original datavyu .opf file name. For example, a Datavyu file dyad1.opf, when exported using datavyu2csv.rb, will have in the .csv file dyad1 as the value in the column "file", and if files="dyad1" is specified for a function, only data from dyad1.opf will be imported even though they may be separated as multiple .csv files in a folder.

folder

Either a scalar character pointing to a directory where contents are to be scanned, or a vector of .csv files to import instead of all the contents found within a folder. Defaults to the R option datavyur.folder, which is the internal example data folder that is used throughout this package. If folder is a character vector of multiple .csv file paths, set as_list=TRUE.

traverse

Search subfolders of folder for datavyur .csv files.

Details

Most functions in this package only work if you had previously used the datavyu2csv.rb script to export a Datavyu file to .csv. This script can be obtained from ruby_script_folder(). Exported data is in the form of several "/column__file.csv" files. Files will be searched based on the directory supplied to the folder argument. Valid files will have the following columns: file, column, onset, offset, ordinal, along with custom user codes as columns.

Value

data.frame with all info from the located .csv files consisting of the following columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# datavyu_search(folder="path/to/my/exported/datavyu/data")

# using the package's internal data folder as an example
datavyu_search(folder=datavyur_internal_data())

# globally setting the data folder to the internal data folder
options(datavyur.folder=datavyur_internal_data())

# search by Datavyu column name using the globally set folder
datavyu_search("parenthands")

iamamutt/datavyur documentation built on Dec. 20, 2021, 5:57 p.m.