User Tools

Site Tools


jvs:fscan:manual:chapter2:table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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]
Line 1: Line 1:
- **fScan Reference Manual, Chapter 2 (CmdLineOptions): table** 
  
-===== Table -- Manipulate data tables ===== 
-**usage:**\\ 
-  * **-table [file] TABLENAME [FLAG] FILENAME**\\ 
-  * **-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 [reference] TABLENAME [FLAG] REFNAME**\\ 
-  * **-table [glossary] TABLENAME [FLAG] GLOSSARYNAME**\\ 
-  * **-table dataset TABLENAME [FLAG]**\\ 
-  * **-table window TABLENAME [FLAG]**\\ 
-  * **-table directory TBLNAME [FLAG] DIRNAME [MATCHSTRING [TBL2NAME]]**\\ 
-  * **-table configure TBLNAME [FLAG] COLNAME [TYPE] [COLNUM] [COLNAME [TYPE] [COLNUM]] ...**\\ 
-  * **-table copy TBLNAME [FLAG] NEWNAME [nrows NROWS] ]**\\ 
-  * **-table sort TBLNAME FLAG SORTCOL**\\ 
-  * **-table merge TBLNAME FLAG TBL2NAME MERGECOL**\\ 
-  * **-table printf TBLNAME FLAG FORMATSTR [OUTFILE]**\\ 
-  * **-table invivo TBLNAME FLAG NAME**\\ 
- 
-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/REFNAME/GLOSSARYNAME argument (if the argument is unrecognized, "file" is assumed).  
-====Loading table from file==== 
-With FILENAME and no "show" modifier, this loads table data from file FILENAME to table TABLENAME.\\ 
- 
-====Loading table from a directory==== 
-FLAG (combine by adding):\\ 
-  * 1 - include regular files (text and data)\\ 
-  * 2 - include directory names\\ 
-  * 4 - include filetype\\ 
-  * 8 - sort the table\\ 
-  * 16 - append new data to existing table\\ 
-DIRNAME: starting path for directory search (default= current dir)\\ 
-MATCHSTRING: template string for file name matching Glob-like (* and ?) substitutions (default= *)\\ 
-TBL2NAME: if present, assumes first column is list of directories; each is appended to DIRNAME and then used as the starting point for a dir search of MATCHSTRING\\ 
- 
-====Loading table from internal data lists==== 
- 
-===Data set names=== 
-The table will contain a list of data sets currently available. 
- 
-===Window names=== 
-The table will contain a list of windows currently open. 
- 
-===Reference=== 
-The table will contain a list of condition labels for the specified reference time course. 
- 
-===Glossary=== 
-The table will contain a list of ROI labels for the specified glossary. 
-  
-====Displaying table data==== 
-The "show" modifier is used to display table data.\\ 
-Show is the default if FILENAME is missing.\\ 
-Show with no TABLENAME prints a list of all tables in memory.\\ 
-Show with TABLENAME prints the specified table.\\ 
-If FILENAME is specified, Show prints the table to file FILENAME.\\ 
-The FLAG argument can specify some printing options.\\ 
- 
-Show FLAG (combine by adding):\\ 
-  * 1 - show column names\\ 
-  * 2 - show column types\\ 
-  * 4 - show row numbers\\ 
-  * 010 - show table title 
-  * 020 - comma separated columns 
-  * 040 - tab separated columns 
-  * 0100 - only show up to 10 rows of data 
-  * 0200 - show no data, only header 
-  * 0400 - show row sorting index if available 
-====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" (of these only the name is required). Multiple column specifications can be combined in a single command. 
- 
-If column NAME exists it is modified to TYPE and moved, if necessary, to column COLNUM. 
-Otherwise, column NAME of type TYPE is added as COLNUM (COLNUM=0 or omitted, means last column). 
-TYPE can be int, float, or text (default is text). 
- 
-====Printf -- formatted display of table data==== 
-The PRINTF option allows you to specify a format string to print out each table row. 
-The format string uses format conversion codes starting with a '%' and ending with a '#', as in:\\ 
- **%W.PcN#**\\ 
-W (width) and P (precision) are optional number values, indicating the width (in character spaces) and precision (values after the decimal point for numbers) to use in the display. If W is omitted there is no text padding.\\ 
-The 'cN' specification indicates which table column value to insert in this location, where N is the column number (1-ncolumns). The format conversion string %W.PcN# will be converted to a C-style string, either "%W.Ps" or "%W.Pf", depending on whether the specified column contains text or numerical data. 
- 
-There are 5 other special case conversion strings:\\ 
- **%W#** - this will be replaced by the current row number (as %Wd)\\ 
- **% %** - this will print out as a single '%' character\\ 
- **\t** - replaced with <Tab> character\\ 
- **\n** - replaced with <Newline> character\\ 
- **\r** - replaced with <Return> character\\ 
- 
- 
-All other text characters in the format string will be copied directly to each line of output. 
- 
-====Performing a table query==== 
-Query 
- 
-COL can be a column index number (1-NCols) or a column name. 
- 
-ROW can be a row index (1-NRows) to select a particular cell within COL, or it can be a value to search for in COL (FLAG 8: find rows NOT matching; FLAG 16: only 1st match is found). 
- 
-If searching (FLAG&4), then the single value in COL2 of the matched row will be returned if COL2 is specified, or the whole row will be returned if COL2 is omitted. 
-If not searching, then the single value at COL,ROW will be returned if ROW is specified, or the whole column will be returned if ROW is omitted. 
- 
-FLAG:\\ 
- * 1 - store into uservarb NEWNAME\\ 
- * 2 - store into table NEWNAME\\ 
- * 4 - search for value ROW in COL (assumed if ROW is not a number)\\ 
- * 8 - find rows where value in COL is **not** ROW\\ 
- * 16 - only return the first match\\ 
- * 32 - don't display error message on query failure\\ 
- 
-====Sorting a table==== 
-Sort FLAG:\\ 
- * 1 - Numerical sort\\ 
- * 2 - Descending order\\    
- 
-====Special case tables==== 
- * [[jvs:fscan:manual:chapter2:invivo|InVivo]] - Manipulating tables of file names for InVivo DynaSuite 
- 
-**See Also:**\\ 
-[[jvs:fscan:manual:chapter2:browse|Browse]]  
- 
-[[jvs:fscan|fScan Home]],  
-[[jvs:fscan:manual|fScan Manual]],  
-[[jvs:fscan:manual:chapter2|CmdLineOptions]],  
-[[jvs:fscan:manual:help|Manual Help]] 
jvs/fscan/manual/chapter2/table.txt · Last modified: 2023/02/23 18:43 (external edit)