Making One Column Appear After Another
Jump to navigation
Jump to search
Makes the Coke column appear to the right of the Pepsi column. Refer to Making One Row Appear After Another for a detailed description of how this example works.
This example can be run in C:\Program Files\Q\Examples\Cola.Q (this may be located on a different place on your computer depending upon how Q was installed). Create a table of Q5. Brand associations' by SUMMARY, right-click on a row or column header and select Swap Rows and Columns.
table.moveColumnAfter(table.columnIndex('Coca Cola'), table.columnIndex('Pepsi'));
See also
- Making One Row Appear After Another.
- Table JavaScript and Plot JavaScript for an explanation of how to run this code.
- Table JavaScript and Plot JavaScript Reference for technical information.
- Table JavaScript and Plot JavaScript Examples Library for other examples.
- JavaScript for information about the JavaScript programming language.
- QScript for tools for automating projects using JavaScript.
- JavaScript Variables for detail on how to create new variables in the Variables and Questions tab using JavaScript.