datavyu-alignment: Merge from a list horizontally

Description Usage Arguments Value Functions Examples

Description

Merge a list of imported data temporally or ordinally. This aligns data horizontally by appending and merging new columns to a common data set.

Usage

1
2
3
4
5
ordinal_align(...)

temporal_align(fps = 30, keep_frame_num = TRUE, ...)

horz_merge_datavyu_list(.list, .f, ..., fps = NULL)

Arguments

...

additional arguments passed to import_datavyu_to_list()

fps

a common framerate to use for alignment. Only set if you want to align temporally. If not set then it will default to ordinal alignment. For temporal_align this defaults to 30 FPS.

keep_frame_num

Keep the frame_number column, which will result in a much larger data set. If keep_frame_num=FALSE, then all you know is which two events overlap to some degree, not knowing for how long. If keep_frame_num=TRUE (default), you can calculate the number of frames that overlap between two events, and if fps is know, you can convert this total to milliseconds. video.

.list

a nested list returned from import_datavyu_to_list()

.f

a function to apply to each data set before anything is done to the data.

Value

a data.table with aligned data.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
# set folder path if needed, otherwise use default path with example data.
# options(datavyur.folder="mydatafolder")

#-- Align by a common ordinal number
ord_aligned <- ordinal_align()


# -- Align by a common frame number

# example data with no arguments
ex_data_aligned <- temporal_align(fps=10)

ex_data_aligned_no_frames <- temporal_align(fps=10, keep_frame_num=FALSE)

# example data selecting only one of the columns
ex_data_aligned2 <- temporal_align(columns="childhands")


# -- Align by ordinal or frame but from a list of data objects.
.list <- import_datavyu_to_list()
ord_aligned <- horz_merge_datavyu_list(.list)

## End(Not run)

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