EVOLUTION-MANAGER
Edit File: list.ungroup.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: Ungroup a list by taking out second-level elements</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.ungroup {rlist}"><tr><td>list.ungroup {rlist}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Ungroup a list by taking out second-level elements</h2> <h3>Description</h3> <p>This functon reverses the grouping operation by taking out second-level elements of a nested list and removing the labels of the first-level elements. For example, a list may be created from paged data, that is, its first-level elements only indicate the page container. To unpage the list, the first-level elements must be removed and their inner elements should be taken out to to the first level. </p> <h3>Usage</h3> <pre> list.ungroup(.data, level = 1L, ..., group.names = FALSE, sort.names = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>.data</code></td> <td> <p><code>list</code></p> </td></tr> <tr valign="top"><td><code>level</code></td> <td> <p>integer to indicate to which level of list elements should be ungroupped to the first level.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Preserved use of parameter passing</p> </td></tr> <tr valign="top"><td><code>group.names</code></td> <td> <p><code>logical</code>. Should the group names be preserved?</p> </td></tr> <tr valign="top"><td><code>sort.names</code></td> <td> <p><code>logical</code>. Should the members be sorted after ungrouping?</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="list.group.html">list.group</a></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))) xg <- list.group(x, type) list.ungroup(xg) x <- list(a = list(a1 = list(x=list(x1=2,x2=3),y=list(y1=1,y2=3))), b = list(b1 = list(x=list(x1=2,x2=6),y=list(y1=3,y2=2)))) list.ungroup(x, level = 1) list.ungroup(x, level = 2) list.ungroup(x, level = 2, group.names = TRUE) </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>