smooth_df {voice}R Documentation

Smooth numeric variables in a data frame

Description

Smooth numeric variables in a data frame

Usage

smooth_df(x, k = 11, id = colnames(x)[1], colnum = NULL, mc.cores = 1)

Arguments

x

A data frame.

k

Integer width of the rolling window. Default: 11.

id

The identification column. Default: colname of the first column of x.

colnum

A char vector indicating the numeric colnames. If NULL, uses the columns of the numeric class.

mc.cores

The number of cores to mclapply. By default uses 1.

Value

Vector of interpolated values with length near to compact.to*length(x).

See Also

extract_features

Examples

library(voice)

# get path to audio file
path2wav <- list.files(system.file('extdata', package = 'wrassp'),
pattern = glob2rx('*.wav'), full.names = TRUE)

# minimal usage
M <- extract_features(path2wav, features = c('f0', 'fmt'))
(Ms <- smooth_df(M[-(1:2)]))
dim(M)
dim(Ms)

[Package voice version 0.4.21 Index]