Description Usage Arguments Value See Also Examples
Standared inteface to spread
.
Take values from the columns named in the columns
argument and
move them into blocks of rows, placing values in the new column specified by value
and indicating which column each value came from in the new column specified by key
.
1 2 3 4 5 6 7 8 9 10 |
data |
data.frame to take values from. |
key |
character, name for existing column to get new column names from. |
value |
character, name for existing column to take values from. |
... |
not used, force later arguments to bind by name. |
fill |
passed to spread. |
convert |
passed to spread. |
drop |
passed to spread. |
sep |
passed to spread. |
converted data.
1 2 3 4 5 6 7 8 9 | d <- wrapr::build_frame(
'id', 'name_for_new_column' , 'value_to_take' |
1 , 'col1' , 'a' |
1 , 'col2' , '10' |
2 , 'col1' , 'b' |
2 , 'col2' , '20' )
spread_se(d,
key = 'name_for_new_column',
value = 'value_to_take')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.