<!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: Forms component group ID vector of X</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for make.x.s"><tr><td>make.x.s</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Forms component group ID vector of X</h2>

<h3>Description</h3>

<p>This function returns a vector which lets WQS.fit know the size and order of groups in X
</p>


<h3>Usage</h3>

<pre>
make.x.s(df, num.groups, groups)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>df</code></td>
<td>
<p>A dataframe containing named component variables</p>
</td></tr>
<tr valign="top"><td><code>num.groups</code></td>
<td>
<p>An integer representing the number of component groups desired</p>
</td></tr>
<tr valign="top"><td><code>groups</code></td>
<td>
<p>A list, each item in the list being a string vector of variable names for one component group</p>
</td></tr>
</table>


<h3>Value</h3>

<p>A vector of integers, each integer relating how many columns are in each group
</p>


<h3>Examples</h3>

<pre>
data("simdata")
group_list &lt;- list(c("pcb_118", "pcb_138", "pcb_153", "pcb_180", "pcb_192"),
                   c("as", "cu", "pb", "sn"),
                   c("carbaryl", "propoxur", "methoxychlor", "diazinon", "chlorpyrifos"))
x.s &lt;- make.x.s(simdata, 3, group_list)
x.s
</pre>


</body></html>
