Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in loading demographics.csv #51

Closed
joshvolponi opened this issue May 31, 2024 · 3 comments · Fixed by #56
Closed

Error in loading demographics.csv #51

joshvolponi opened this issue May 31, 2024 · 3 comments · Fixed by #56

Comments

@joshvolponi
Copy link
Collaborator

joshvolponi commented May 31, 2024

Problem: "I found the aceR toolbox cannot load the demographic.csv and will generate error if I remove the demographic.csv. Attached please kindly find the R code and the output." This may be related to #49 as the columns N and Y are with the new name convention
ACE_RawData_WPI2-20240531T173409Z-001.zip
Attached is the file that they were trying to process

@monicathieu
Copy link
Collaborator

monicathieu commented Jun 9, 2024

Ahh, thank you for uploading the example data! This data makes clear that the new naming convention is indeed coming out of ACE Nexus. This is the first time I'm learning about the new Nexus column naming convention.

I just checked the development branch and if load_ace_bulk() is called with app_type = "nexus", it SHOULD handle at least the new "Participant ID" column name. The "PID" column in the new demographics.csv appears to be a duplicate column of "Participant ID", so that shouldn't cause issues either. Is this person able to run this data through on the development branch with app_type = "nexus"? If not, please post their error message here and that will help me identify which column renames aren't handled yet.

@arjunpur
Copy link
Collaborator

Confirmed that this issue does arise because the demographics file is being transformed into a dataframe with duplicate PID columns:

Browse[1]> temp <- dat %>% mutate(!!COL_MODULE := identify_module(file[1]))
Error in mutate(., `:=`(!!COL_MODULE, identify_module(file[1]))) : 
  Can't transform a data frame with duplicate names.
Browse[1]> names(dat)
 [1] "v1"                      "age"                     "i18n"                    "app_id"                 
 [5] "build"                   "gender"                  "section"                 "os_version"             
 [9] "device_type"             "handedness"              "device_model"            "games_scores"           
[13] "install_mode"            "pid"                     "client_time_zone"        "games_play_count"       
[17] "processor_count"         "runtime_platform"        "system_memory_size"      "times_finished_game"    
[21] "graphics_device_name"    "processor_frequency"     "games_map_dialog_stage"  "client_time_zone_offset"
[25] "pid"                     "time"                    "updated_at"              "file"  

@arjunpur
Copy link
Collaborator

I have a fix for this issue here: #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants