extractWave(tuneR)
extractWave()所属R语言包:tuneR
Extractor for Wave objects
提取波对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extractor function that allows to extract inner parts for Wave objects (interactively).
提取功能,允许提取Wave对象(交互)的内部零件。
用法----------Usage----------
extractWave(object, from = 1, to = length(object@left),
interact = interactive(), xunit = c("samples", "time"), ...)
参数----------Arguments----------
参数:object
Object of class Wave.
对象类Wave。
参数:from
Sample number or time in seconds (see xunit) at which to start extraction.
样本数或时间(以秒见xunit)开始提取。
参数:to
Sample number or time in seconds (see xunit) at which to stop extraction. If to < from, object will be returned as is.
样本数或时间(以秒见xunit)在停止提取的。如果to < from,object将返回的。
参数:interact
Logical indicating whether to choose the range to be extracted interactively (if TRUE). See Section Details.
逻辑指示是否选择的范围要提取的交互方式(如果TRUE)。请参阅节详细介绍。
参数:xunit
Character indicating which units are used to specify the range to be extracted (both in arguments from and to, and in the plot, if interact = TRUE). If xunit = "time", the unit is time in seconds, otherwise the number of samples.
字符,指示哪个单位来指定要提取的范围内(无论是在参数from和to,并在图中,如果interact = TRUE)。如果xunit = "time",单位是时间(秒),否则的样本数。
参数:...
Parameters to be passed to the underlying plot function (plot-methods), if interact = TRUE.
参数被传递到底层的绘图功能(plot-methods),如果interact = TRUE。
Details
详细信息----------Details----------
This function allows interactive selection of a range to be extracted from an object of class Wave. The default is to use interactive selection, if the current R session is interactive. In case of interactive selection, plot-methods plot the Wave object, and the user may click on the starting and ending points of his selection (given neither from nor to have been specified, see below). The cut-points are drawn and the corresponding selection will be returned in form of a Wave object.
此功能允许的范围内的交互式选择要提取的对象的类Wave。默认情况下是使用交互式选择,如果当前的的R对话是interactive。在互动选择的情况下,plot-methods图Wave对象,而用户可以点击他的选择的出发点和落脚点(既不from,也不to已经指定,见下文)。切点绘制和形式的Wave对象将返回相应的选择。
Setting interact = TRUE in a non-interactive session does not work.
设置interact = TRUE的一个非交互式会话无法正常工作。
Setting arguments from or to explicitly means that the specified one does not need to be selected interactively, hence only the non-specified one will be selected interactively. Moreover, setting both from or to implies interact = FALSE.
设置的参数from或to明确表示的指定的一个并不需要交互来选择,因此只在非指定的一个将被选择交互。此外,同时设置from或to意味着interact = FALSE,。
值----------Value----------
An object of class Wave.
对象的类Wave。
(作者)----------Author(s)----------
Uwe Ligges, <a href="mailto:ligges@statistik.tu-dortmund.de">ligges@statistik.tu-dortmund.de</a>
参见----------See Also----------
Wave-class, Wave, bind, channel, mono
波级,Wave,bind,channel,mono
实例----------Examples----------
Wobj <- sine(440, bit = 16)
# extracting the middle 0.5 seconds of that 1 sec. sound:[提取中间0.5秒,1秒。声音:]
Wobj2 <- extractWave(Wobj, from = 0.25, to = 0.75, xunit = "time")
Wobj2
## Not run: [#不运行:]
# or interactively:[或以交互方式:]
Wobj2 <- extractWave(Wobj)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|