sfilter.html
来自「R-Project是一个开源的统计软件,专门有一个R语言,类似S语言,这个包里面」· HTML 代码 · 共 84 行
HTML
84 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Statement Filter</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>
<table width="100%" summary="page for sFilter {tm}"><tr><td>sFilter {tm}</td><td align="right">R Documentation</td></tr></table>
<h2>Statement Filter</h2>
<h3>Description</h3>
<p>
Filter metadata by special statements.
</p>
<h3>Usage</h3>
<pre>
sFilter(object, s, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
a <code>Corpus</code> to be the filter applied to.</td></tr>
<tr valign="top"><td><code>s</code></td>
<td>
a statement of format <code>"tag1 == 'expr1' & tag2 ==
'expr2' & ..."</code>.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
arguments passed over by calling functions.</td></tr>
</table>
<h3>Details</h3>
<p>
The statement <code>s</code> models a simple query language. It consists of
an expression as passed over to a data frame for subsetting. Tags in
<code>s</code> represent metadata variables. Variables only available at
document level are shifted up to the data frame if necessary. Note
that the metadata tags for the slots <code>Author</code>, <code>DateTimeStamp</code>,
<code>Description</code>, <code>ID</code>, <code>Origin</code> and <code>Heading</code> are
<code>author</code>, <code>datetimestamp</code>, <code>description</code>,
<code>identifier</code>, <code>origin</code> and <code>heading</code>, respectively, to
avoid name conflicts.
</p>
<h3>Value</h3>
<p>
A Boolean vector to represent the subset of the <code>DMetaData</code>
(extended for shifted up variables) data frame as specified by the
statement.</p>
<h3>Author(s)</h3>
<p>
Ingo Feinerer
</p>
<h3>Examples</h3>
<pre>
## Load example dataset
data("crude")
## Statement Filter returning TRUE for document with ID 127 and heading DIAMOND ...
sFilter(crude, "identifier == '127' & heading == 'DIAMOND SHAMROCK (DIA) CUTS CRUDE PRICES'")
</pre>
<hr><div align="center">[Package <em>tm</em> version 0.3 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?