subsample_file: Feature-based subsampling of signals from a file

Description Usage Arguments Value See Also Examples

Description

Read a tab or space delimited file containing signal characteristics and subsample a given proportion of signals

Usage

1
subsample_file(file, p, k = 10, plot = TRUE)

Arguments

file

path to a tab or space delimited file containing signal characteristics

p

proportion of the total number of signals to subsample, between 0 and 1

k

number of groups

plot

wether to plot the result of the subsampling

Value

Two files, one for the signals picked in the subsample and one for the non-picked signals

See Also

subsample

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# get an example file from within the package
data_file <- system.file("sirena.txt", package="soundclass")
# check what it looks like
file.show(data_file)
# copy it to a temporary directory in which we can work
tmp <- tempdir()
file.copy(data_file, tmp)
# perform feature based subsampling on this file and show the results
subsample_file(paste0(tmp, "/sirena.txt"), p=0.2)
list.files(tmp)

jiho/soundclass documentation built on June 5, 2019, 10:10 p.m.