EVOLUTION-MANAGER
Edit File: subset.list.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Subset a list by a logical condition</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for subset.list {rlist}"><tr><td>subset.list {rlist}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Subset a list by a logical condition</h2> <h3>Description</h3> <p>Subset a list by a logical condition </p> <h3>Usage</h3> <pre> ## S3 method for class 'list' subset(x, subset, select, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>The list to subset</p> </td></tr> <tr valign="top"><td><code>subset</code></td> <td> <p>A logical lambda expression of subsetting condition</p> </td></tr> <tr valign="top"><td><code>select</code></td> <td> <p>A lambda expression to evaluate for each selected item</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional parameters</p> </td></tr> </table> <h3>Examples</h3> <pre> x <- list(p1 = list(type='A',score=list(c1=10,c2=8)), p2 = list(type='B',score=list(c1=9,c2=9)), p3 = list(type='B',score=list(c1=9,c2=7))) subset(x, type == 'B') subset(x, select = score) subset(x, min(score$c1, score$c2) >= 8, data.frame(score)) subset(x, type == 'B', score$c1) do.call(rbind, subset(x, min(score$c1, score$c2) >= 8, data.frame(score))) </pre> <hr /><div style="text-align: center;">[Package <em>rlist</em> version 0.4.6.2 <a href="00Index.html">Index</a>]</div> </body></html>