EVOLUTION-MANAGER
Edit File: 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: Create a 'List environment' that wraps given 'data' and most...</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 List {rlist}"><tr><td>List {rlist}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a <code>List environment</code> that wraps given <code>data</code> and most list functions are defined for chainable operations.</h2> <h3>Description</h3> <p>Create a <code>List environment</code> that wraps given <code>data</code> and most list functions are defined for chainable operations. </p> <h3>Usage</h3> <pre> List(data = list()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>data</code></td> <td> <p>A <code>list</code> or <code>vector</code></p> </td></tr> </table> <h3>Details</h3> <p>Most list functions are defined in <code>List environment</code>. In addition to these functions, <code>call(fun,...)</code> calls external function <code>fun</code> with additional parameters specifies in <code>...</code>. </p> <p>To extract the data from List <code>x</code>, call <code>x$data</code> or simply <code>x[]</code>. </p> <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))) m <- List(x) m$filter(type=='B')$ map(score$c1) [] m$group(type)$ map(g ~ List(g)$ map(score)$ call(unlist)$ call(mean) []) [] # Subsetting, extracting, and assigning p <- List(list(a=1,b=2)) p['a'] p[['a']] p$a <- 2 p['b'] <- NULL p[['a']] <- 3 </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>