Description Usage Arguments Value
renormalize a denormalized list into a Boyce-Codd style data frame suitable for relational databases.
1 2 3 4 5 6 7 8 | renormalize(
x,
idcol,
listcol,
sep = ",",
listcolname = "normalized",
na.replace = ""
)
|
x |
a datafame to analyze |
idcol |
a string describing the column name holding ids or the numeric value of the column's index |
listcol |
a string describing the column name holding the values to be re-normalized or the numeric value of the column's index. Note that listcol data will be coerced to a string. NA values and values which do not coerce properly will be replaced with empty strings. |
sep |
a string describing the seperator between values in listcol. Defaults to ",". |
listcolname |
the name of the new column of re-normalized values. Defaults to 'normalized'. |
na.replace |
a string to use in place of NA values of x. Defaults to a blank string. |
returns a 2-column data frame. The first column is a vector of ids from the original data frame. The second column is the renormalized data. Rows from x where listcol is NA are removed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.