Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Order of columns in loops

borisboris Posts: 60

Hi all,

In the last version, I found that sometimes OS is reordering the columns inside a loop by alphabetical order. This can be problematic as I have my material in Excel in a certain order and this could generate errors if the order of columns is not the same in Excel and OS...

Congratulations for the new features such as the new variable management and the pseudorandomization : these are really helpful !

Best regards,

Comments

  • borisboris Posts: 60
    edited July 19

    Thank you Roelof but my problem is not for the log file but inside the OS interface...

    This was not my original columns order but OS reordered them...
    Here was my original order
    Target Prime TypeCV TypePrime TypeTarget1 TypeTarget2 CorrectAnswer

    Best

    image.png 2.9K
  • RoelofRoelof Posts: 90

    Right, I see, and indeed opensesame seems to reorder them alphabetically, I am guessing that it will take some intricate changes to the program in order for it to maintain the original structure. Perhaps it could work by renaming the variables in a such a way that the alphabetical order in open sesame corresponds to the order in the excel file? (e.g. A_var1, B_col2, C_something_else, etc)

  • sebastiaansebastiaan Posts: 2,846

    Hi guys,

    Thanks for flagging this. This is indeed pretty annoying. Would you mind testing out the prerelease of 3.1.8 (currently 3.1.8a1)? This should preserve the order of columns in the loop table. But there have been a few updates to the underlying datamatrix library, so it needs a thorough test.

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • RoelofRoelof Posts: 90

    Hi Sebastiaan,

    That'd be fun to have a look at, and just out of curiosity; what was the fix for the order of the column preservation?

    Roelof

  • sebastiaansebastiaan Posts: 2,846

    Essentially, DataMatrix, which is the data-structure used by the loop, by default returns a sorted view of columns, because that is convenient when working with the data programmatically (otherwise you'll never find the column you're looking for if you print out a list of all column names). But in the context of a spreadsheet that's of course not very sensible. So now sorting is disabled!

    Thanked by 2Roelof boris

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • borisboris Posts: 60

    Hi Sebastiaan,

    So I guess this will be implemented in the next version.
    Is there anyway to disable it in 3.1.17 ?

    Best regards

  • sebastiaansebastiaan Posts: 2,846

    Hi Boris,

    No, you really need to update OpenSesame in its entirety. But I think you can use the 3.1.8 prerelease without too much worry!

    Cheers,
    Sebastiaan

    Thanked by 1boris

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.