interp_df {voice} | R Documentation |
Inperpolate data frames
Description
Interpolate data frames using multicore, compressing to compact.to
fraction. May remove zeros.
Usage
interp_df(
x,
compact.to,
id = colnames(x)[1],
colnum = NULL,
drop.x = TRUE,
drop.zeros = FALSE,
to.data.frame = TRUE,
round.off = NULL,
weight = NULL,
mc.cores = 1
)
Arguments
x |
A data frame. |
compact.to |
Proportion of remaining points after interpolation. If equals to 1 and keep.zeros = TRUE, the original vector is presented. |
id |
The identification column. Default: |
colnum |
A |
drop.x |
Logical. Drop columns containing .x? Default: |
drop.zeros |
Logical. Drop repeated zeros or keep 1 zero per null set? Default: |
to.data.frame |
Logical. Should return a data frame? If |
round.off |
Number of decimal places of the interpolated |
weight |
Vector of weights with same length of |
mc.cores |
The number of cores to mclapply. Default: |
Value
A data frame of interpolated values with nrow near to compact.to*length(x)
.
See Also
interp
, interp_mc
Examples
library(voice)
# get path to audio file
path2wav <- list.files(system.file('extdata', package = 'wrassp'),
pattern = glob2rx('*.wav'), full.names = TRUE)
# getting Media data frame via lean call
M <- extract_features(dirname(path2wav), features = c('f0','fmt'),
mc.cores = 1, verbose = FALSE)
(cM.df <- interp_df(M[,-(1:2)], 0.1, mc.cores = 1))
(cM.df2 <- interp_df(M[,-(1:2)], 0.1, drop.x = FALSE, mc.cores = 1))
dim(M)
dim(cM.df)
dim(cM.df2)
(cM.list <- interp_df(M[,-(1:2)], 0.1, to.data.frame = FALSE, mc.cores = 1))