Learn R Programming

rPraat (version 1.3.2-1)

tg.cut: tg.cut

Description

Cut the specified time frame from the TextGrid and preserve time

Usage

tg.cut(tg, tStart = -Inf, tEnd = Inf)

Arguments

tg

TextGrid object

tStart

beginning time of time frame to be cut (default -Inf = cut from the tmin of the TextGrid)

tEnd

final time of time frame to be cut (default Inf = cut to the tmax of the TextGrid)

Value

TextGrid object

See Also

tg.cut0, pt.cut, pt.cut0, tg.read, tg.plot, tg.write, tg.insertInterval

Examples

Run this code
# NOT RUN {
tg <- tg.sample()
tg2 <-   tg.cut(tg,  tStart = 3)
tg2_0 <- tg.cut0(tg, tStart = 3)
tg3 <-   tg.cut(tg,  tStart = 2, tEnd = 3)
tg3_0 <- tg.cut0(tg, tStart = 2, tEnd = 3)
tg4 <-   tg.cut(tg,  tEnd = 1)
tg4_0 <- tg.cut0(tg, tEnd = 1)
tg5 <-   tg.cut(tg,  tStart = -1, tEnd = 5)
tg5_0 <- tg.cut0(tg, tStart = -1, tEnd = 5)
# }
# NOT RUN {
tg.plot(tg)
tg.plot(tg2)
tg.plot(tg2_0)
tg.plot(tg3)
tg.plot(tg3_0)
tg.plot(tg4)
tg.plot(tg4_0)
tg.plot(tg5)
tg.plot(tg5_0)
# }

Run the code above in your browser using DataLab