mapIdxToTime: Establishes mapping from index to time

View source: R/post_alignment.R

mapIdxToTimeR Documentation

Establishes mapping from index to time

Description

Takes a time vector and index vector of same length. This function create a new time vector given indices specified in idx.

Usage

mapIdxToTime(timeVec, idx)

Arguments

timeVec

A numeric vector

idx

An integer vector

Value

A mutated time vector

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

ORCID: 0000-0003-3500-8152

License: (c) Author (2019) + GPL-3 Date: 2019-12-13

Examples

timeVec <- c(1.3,5.6,7.8)
idx <- c(NA, NA, 1L, 2L, NA, NA, 3L, NA)
mapIdxToTime(timeVec, idx) # c(NA, NA, 1.3, 5.6, 6.333, 7.067, 7.8, NA)


shubham1637/DIAlign documentation built on March 27, 2023, 7:12 a.m.