UW-GAC / dbgaptools

R package to create and check standard files for dbGaP submission
Other
1 stars 3 forks source link

Fix .read_dd_file for multiple blank column names #3

Closed sarahcn closed 6 years ago

sarahcn commented 6 years ago

Issue identified by Cecelia "However, if there are more than 2 encoded values, i.e. more than one blank column, the code gives an error. In .read_ds_file, the dat after reading in the file is fine – it has blank headers. However, at the point where you have “dat <- dat[!blank.rows,!blank.cols]”, apparently R doesn’t allow columns to have the same name – so the first blank column header is still blank but it then labels the next column header as “.1”. So in .read_dd_file, when you want to label the columns as X_1, X_2, etc, it only recognizes one column as blank so you get X_1 and still left with “.1” as a column header. "

sarahcn commented 6 years ago

This should be fixed as of commit dea1c90dc094b9d7fc921ccf1b05a75f3743c0ef