reorder_columns: Reorders the columns of a dataset so they are in the expected...

Description Usage Arguments Details Value Author(s)

Description

The user, or the automatic fixing process, might lead to situations where a pdi has for variable list(a=1, a=2) whilst pij has list(a=2,a=1). As all the solving process relies on the hypothesis the order is OK, checking of such a dataset would fail.

Usage

1
reorder_columns(df, expected_order)

Arguments

df

a data frame

expected_order

a list of strings corresponding to the same col names with a different order

Details

This function helps fixing these situations by just changing the order of the dataset's columns

Value

the data frame in a different order

Author(s)

Samuel Thiriot <samuel.thiriot@res-ear.ch>


samthiriot/gosp.dpp documentation built on May 18, 2019, 3:44 p.m.