jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Bug]: Flexplot, undefined columns selected #2188

Open xhzair opened 1 year ago

xhzair commented 1 year ago

JASP Version

0.17.2.1

Commit ID

No response

JASP Module

Visual Modeling

What analysis are you seeing the problem on?

Flexplot

What OS are you seeing the problem on?

Windows 11

Bug Description

image

Expected Behaviour

The .csv file was generated by using function write.table in R. However, no matter how to set the col names, the Flexplot could not plot as expected.

Steps to Reproduce

  1. Generate the .csv file by using function write.table in R.
  2. Open the .csv file by JASP.
  3. Drag the dependent and independent variable into the box and then the warning appear.

Log (if any)

No response

Final Checklist

boutinb commented 1 year ago

@dustinfife Can you have allot at this issue?

dustinfife commented 1 year ago

I'm guessing it has to do with the spaces in the variable names. Maybe you can try without spacing and see if that fixes the issue? If it does, I can look into making flexplot not quit when it sees spaces in variable names.

xhzair commented 1 year ago

I'm guessing it has to do with the spaces in the variable names. Maybe you can try without spacing and see if that fixes the issue? If it does, I can look into making flexplot not quit when it sees spaces in variable names.

@dustinfife Thanks for your reply. However, nothing changed without space. image

tomtomme commented 8 months ago

@xhzair Can you re-test with jasp 0.18.3? Flexplot got some updates. If this does not fix it - can you share your jasp file? Rename it to .zip first, then drag and drop here. thx!

xhzair commented 8 months ago

@xhzair Can you re-test with jasp 0.18.3? Flexplot got some updates. If this does not fix it - can you share your jasp file? Rename it to .zip first, then drag and drop here. thx!

@tomtomme Thanks for your reply! I tried again with the latest version 0.18.3 and found something confused. In the .zip attachment, the examplar data include 10 rows and several cols. After launching the .jasp file and opening Flexplot function, the bug appeared just as I added the dependent variable (e.g., Confidence). You can see the bug as shown below. However, I found some changes seemed to help fix the bug. But I really do not know why they work. Maybe you can figure out.

  1. Delete other cols and only keep the IV (e.g., ObjecitivePhi) and DV (e.g., Confidence) alive.
  2. Change all other cols' names. For example, I named other cols as V1, V2, V3, etc. Both work no matter I edit through EXCEL or in JASP directly. The .jasp file is attached below. Again, thanks for your help! image example data.zip
tomtomme commented 8 months ago

I figured it out. You had many variables that acually were constants (same number for the whole column). This seems to confuse flexplot, even if those vars are not entered as IV, DV etc. The problem seems isolated to flexplot. Descriptives for example can deal with this just fine.

@dustinfife Can you fix this? Thx!

tomtomme commented 7 months ago

@xhzair @dustinfife I tested this with a different file that includes many constants and that works fine! I then tried to change the short var names A B C etc. to longer names and that works!!!

So flexplot actually does not like var names that are only one character long. We had this problem with other module (RM anova) in the past. So I hope this is fixable for flexplot too? The other modules from visual modeling are also affected.

tomtomme commented 4 months ago

@dustinfife this issue is still present with latest 0.19beta. If a variable named with only one character is in the data, flexplot cannot handle even the other "normal" variables in the dataset. Can you confirm?

tomtomme commented 3 months ago

@dustinfife still valid for latest 0.19beta

here is the file to reproduce example.data.zip

Delete the Vars with names of only one character and the error disappears.

-------- Application Info -------- JASP Version: JASP 0.19 Build Branch: HEAD Build Date: Jun 18 2024 13:07:48 (Netherlands) Last Commit: a6131f3f59ec89e1804870d99b73e0e63803d8d9

-------- Basic Info -------- Operating System: KDE Flatpak runtime Product Version: 6.7 Kernel Type: linux Kernel Version: 6.9.3-3-MANJARO Architecture: x86_64 Install Path: /app/bin Platfotm Name: wayland System Local: de_DE