col.read: col.read

Description Usage Arguments Value See Also Examples

View source: R/col.R

Description

Loads Collection from Praat in Text or Short text format. Collection may contain combination of TextGrids, PitchTiers, Pitch objects, Formant objects, and IntensityTiers.

Usage

1
col.read(fileName, encoding = "UTF-8")

Arguments

fileName

Input file name

encoding

File encoding (default: "UTF-8"), "auto" for auto-detect of Unicode encoding

Value

Collection object

See Also

tg.read, pt.read, pitch.read, formant.read, it.read

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
25
26
27
28
29
30
31
## Not run: 
coll <- col.read("coll_text.Collection")
length(coll)  # number of objects in collection
class(coll[[1]])["type"]  # 1st object type
class(coll[[1]])["name"]  # 1st object name
it <- coll[[1]]  # 1st object
it.plot(it)

class(coll[[2]])["type"]  # 2nd object type
class(coll[[2]])["name"]  # 2nd object name
tg <- coll[[2]]  # 2nd object
tg.plot(tg)
length(tg)  # number of tiers in TextGrid
tg$word$label

class(coll[[3]])["type"]  # 3rd object type
class(coll[[3]])["name"]  # 3rd object type
pitch <- coll[[3]]  # 3rd object
names(pitch)
pitch$nx  # number of frames
pitch$t[4]        # time instance of the 4th frame
pitch$frame[[4]]  # 4th frame: pitch candidates
pitch$frame[[4]]$frequency[2]
pitch$frame[[4]]$strength[2]

class(coll[[4]])["type"]  # 4th object type
class(coll[[4]])["name"]  # 4th object name
pt <- coll[[4]]  # 2nd object
pt.plot(pt)

## End(Not run)

rPraat documentation built on Feb. 28, 2021, 1:06 a.m.