EntityView : reorder_column
EntityView_ReorderColumn.RdReorder a column in the EntityView. Note that this does not store the column in
Synapse. You must call the synStore() function on this EntityView instance to
store the column in Synapse. This is a convenience function to eliminate
the need to manually reorder the named list stored in the $columns attribute.
You must ensure that the index is within the bounds of the number of columns in the EntityView. If you pass in an index that is out of bounds the column will be added to the end of the list.
Examples
if (FALSE) { # \dontrun{
## Reordering a column
# This example shows how you may reorder a column in an EntityView and then store
# the change back in Synapse.
library(synapser)
synLogin()
entityview = EntityView(id = "syn1234") |> synGet(table_options = TableOptions(include_columns = TRUE))
# Move the column to the beginning of the list
entityview |> synReorderColumn(name = "my_column", index = 0L)
entityview |> synStore()
} # }