This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
jvs:fscan:manual:chapter2:table [2014/01/24 22:27] voyvodic [Table -- Manipulate data tables] |
jvs:fscan:manual:chapter2:table [2023/02/23 18:43] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Table -- Manipulate data tables ===== | ===== Table -- Manipulate data tables ===== | ||
**usage: | **usage: | ||
- | * **-table [file] TABLENAME [FLAG] FILENAME**\\ | ||
* **-table [show]**\\ | * **-table [show]**\\ | ||
- | * **-table [show] TABLENAME [FLAG][FILENAME]**\\ | ||
- | * **-table query TABLENAME [FLAG] NEWNAME COL [VALUE1] [VALUE2]**\\ | ||
- | * **-table delete TABLENAME [FLAG] [COL] [VALUE1] [VALUE2]**\\ | ||
* **-table TABLENAME**\\ | * **-table TABLENAME**\\ | ||
- | * **-table [reference] TABLENAME [FLAG] REFNAME**\\ | + | * **[[jvs: |
- | * **-table [glossary] TABLENAME [FLAG] GLOSSARYNAME**\\ | + | * **[[jvs: |
- | * **-table dataset TABLENAME [FLAG]**\\ | + | * **[[jvs: |
- | * **-table window TABLENAME [FLAG]**\\ | + | * **[[jvs: |
- | * **-table directory TBLNAME [FLAG] DIRNAME [MATCHSTRING [TBL2NAME]]**\\ | + | * **[[jvs: |
- | * **-table configure TBLNAME [FLAG] COLNAME [TYPE] [COLNUM] [COLNAME | + | * **[[jvs: |
- | * **-table copy TBLNAME [FLAG] NEWNAME [nrows NROWS] ]**\\ | + | * **[[jvs: |
- | * **-table sort TBLNAME FLAG SORTCOL**\\ | + | * **[[jvs: |
- | * **-table merge TBLNAME FLAG TBL2NAME MERGECOL**\\ | + | * **[[jvs: |
- | * **-table printf TBLNAME FLAG FORMATSTR [OUTFILE]**\\ | + | * **[[jvs: |
- | * **-table invivo TBLNAME FLAG NAME**\\ | + | * **[[jvs: |
+ | * **[[jvs: | ||
+ | * **[[jvs: | ||
+ | * **[[jvs: | ||
+ | * **[[jvs: | ||
+ | * **[[jvs: | ||
+ | * **[[jvs: | ||
The TABLE command is used for loading, querying, and displaying tables. Tables are multi-column data sets where each column can contain either text strings or number values. Tables can be loaded from text files, or by extracting information from different internal data lists (e.g. data set names, window names, reference time course condition names, glossary names). When loading tables, the type of data source can be identified explicitly using the first argument (e.g. file, reference, glossary, dataset, window) or implicitly using the FILENAME/ | The TABLE command is used for loading, querying, and displaying tables. Tables are multi-column data sets where each column can contain either text strings or number values. Tables can be loaded from text files, or by extracting information from different internal data lists (e.g. data set names, window names, reference time course condition names, glossary names). When loading tables, the type of data source can be identified explicitly using the first argument (e.g. file, reference, glossary, dataset, window) or implicitly using the FILENAME/ | ||
Line 66: | Line 68: | ||
* 040 - tab separated columns | * 040 - tab separated columns | ||
* 0100 - only show up to 10 rows of data | * 0100 - only show up to 10 rows of data | ||
- | * 0200 - show no data, only header | + | * 0200 - replace missing values with ' |
- | * 0400 - show row sorting index if available | + | * 0400 - show no data, only header |
+ | * 01000 - show row sorting index if available | ||
====Configuring a table==== | ====Configuring a table==== | ||
The CONFIGURE option can be used to re-configure an existing table (or create a new empty table). It is intended for adding column names, adding whole columns, moving existing columns, or removing columns. Columns to be modified are specified as triplets of "name type colnum" | The CONFIGURE option can be used to re-configure an existing table (or create a new empty table). It is intended for adding column names, adding whole columns, moving existing columns, or removing columns. Columns to be modified are specified as triplets of "name type colnum" | ||
Line 93: | Line 96: | ||
====Performing a table query==== | ====Performing a table query==== | ||
- | Query | + | |
+ | |||
+ | NEWNAME is where to store the results if FLAG & 3, or if NEWNAME is not a column name in TBLNAME. | ||
COL can be a column index number (1-NCols) or a column name. | COL can be a column index number (1-NCols) or a column name. | ||
+ | (To find column index from column name, use FLAG 16.) | ||
- | ROW can be a row index (1-NRows) to select a particular cell within COL, or it can be a value to search | + | VALUE1 is the value to search for in COL, or if FLAG&4 VALUE1 is the index number |
+ | If VALUE1 is omitted and !FLAG&24, all of COL is returned. | ||
- | If searching (FLAG&4), then the single | + | VALUE2: if FLAG&64, VALUE2 is a binary mask value ANDed with COL values before comparison to VALUE1; otherwise VALUE2 |
- | If not searching, then the single value at COL,ROW will be returned if ROW is specified, or the whole column will be returned | + | |
- | FLAG:\\ | + | FLAG: Option flags (combine by adding):\\ |
* 1 - store into uservarb NEWNAME\\ | * 1 - store into uservarb NEWNAME\\ | ||
* 2 - store into table NEWNAME\\ | * 2 - store into table NEWNAME\\ | ||
- | * 4 - search for value ROW in COL (assumed if ROW is not a number)\\ | + | * 4 - VALUE1 |
- | * 8 - find rows where value in COL is **not** ROW\\ | + | * 8 - only return row number(s)\\ |
- | * 16 - only return | + | * 16 - only return |
- | | + | * 32 - only find first instance\\ |
+ | * 64 - VALUE2 is a binary mask to use for COL value\\ | ||
+ | * 128 - inverse query; search for COL values that don' | ||
+ | | ||
+ | * 512 - find COL with missing value (assumed if VALUE1 = ' | ||
+ | * 1024 - do not convert ' | ||
+ | ====Deleting a table or table entries==== | ||
+ | | ||
+ | |||
+ | If TBLNAME is the only argument, the entire table will be deleted. | ||
+ | |||
+ | With other arguments this will perform a QUERY as described above and only delete those rows that satisfy the query. | ||
+ | FLAG: Option flags (combine by adding):\\ | ||
+ | * 4 - VALUE1 is a row number\\ | ||
+ | * 32 - only delete first instance\\ | ||
+ | * 64 - VALUE2 is a binary mask to use for COL value\\ | ||
+ | * 128 - inverse query; search for COL values that don't match; this is automatic if VALUE1 is preceded by ' | ||
+ | * 256 - don't display error message on query failure\\ | ||
+ | * 512 - find COL with missing value (assumed if VALUE1 = ' | ||
+ | * 1024 - do not convert ' | ||
====Sorting a table==== | ====Sorting a table==== | ||
Sort FLAG:\\ | Sort FLAG:\\ |