Yue-Jiang / pzfx

Read and write 'Graphpad Prism' '.pzfx' files in R
https://yue-jiang.github.io/pzfx/
Other
14 stars 5 forks source link

Support for Characters? #5

Closed billdenney closed 4 years ago

billdenney commented 4 years ago

Thanks for the library. I added support for it to the rio library (leeper/rio) to enable loading data in a more standardized way. (I use rio to load almost all my data.)

A question came up in the rio issues (leeper/rio#235) if pzfx could support character strings. Looking at the GraphPad website (https://www.graphpad.com/guides/prism/7/user-guide/index.htm?using_data_table_format.htm), it appears that contingency tables may support at least a single column of character data (but I don't have a copy of Prism to confirm that). Is there a way that you know of to support character data writing?

Yue-Jiang commented 4 years ago

Thanks! I love rio too and it's great to see pzfx being supported by it. As I replied in the rio issue, I don't see a straightforward way to export factor / character containing columns into prism because the main columns only allow numeric values there. The only possibility, which I'm debating whether it's worth implementing because it requires too much transformation of the data, is to reshape the 'tidy' input data to nested columns based on the factor / character columns, then it's possible to export it into prism. Atm i feel this kind of data transformation is better done by the user herself, because a lot of assumptions will be made to do such transformations especially when there are multiple factor columns.

billdenney commented 4 years ago

Thanks for the comments both places. I agree that it probably doesn’t make sense overall to do the intensive transformations that would be required. I just wanted to be sure that I wasn’t missing something obvious.