transfer_columns()¶
- transfer_columns(db1, db2, remove, *varnames)¶
Transfers columns between spreadsheets. Replacing
db1ordb2with the empty string “”, will refer instead to the currently open spreadsheet in Datavyu.Thus, if you want to transfer a column into the GUI, set
db2to ‘’, and specify the origin spreadsheet file asdb1. If you want to transfer a column from the GUI into a file, setdb1to ‘’, and setdb2to that file’s path.Warning
Setting
removetoTRUEwill DELETE THE COLUMNS YOU ARE TRANSFERRING FROM DB1.Parameter
Type
Description
db1String
The full path to save the first Datavyu file. Set to ‘’ to use the spreadsheet that’s currently open.
db2String
The full path to save the second Datavyu file. Set to ‘’ to use the spreadsheet that’s currently open.
removeBoolean
If
TRUE, Datavyu will delete the columns fromdb1as they are copied todb2.FALSEleaves the columns intact.varnameslist of strings
List of the names of the columns that you wish to copy from
db1todb1. You must specify at least one column name.Returns
Nothing. Saves files in place or modifies the GUI.
Example
The following example transfers the column “idchange” from test.opf to the GUI and leaves test.opf intact and unmodified.
require 'Datavyu_API.rb' begin sourceFile='/Users/datavyutester/Desktop/FileName1.opf' destinationFile='/Users/datavyutester/Desktop/FileName2.opf' columnsToTransfer = ['trial_rel', 'condition_rel'] transferMyVariable(sourceFile, destinationFile, false, columnsToTransfer) end
