datacarpentry / spreadsheet-ecology-lesson

Data Organization in Spreadsheets for Ecologists
https://datacarpentry.org/spreadsheet-ecology-lesson
Other
37 stars 141 forks source link

simplify discussion of windows/unix csv compability under "exporting data" #223

Closed ChristinaLK closed 4 years ago

ChristinaLK commented 6 years ago

The current discussion about csv interoperability across operating systems is fairly technical and doesn't clarify which workarounds are appropriate when (plus, the "git" solution is pretty advanced and hard to parse, even for someone with git skills).

Suggestions:

cc @lmichael107

hoytpr commented 6 years ago

Using Win10 with Office 2013 I can't reproduce the EOL problems in the lesson. Tried saving as .csv, and exporting as DOS.csv or Mac.csv. When does this occur? Windows also uses CR-LF , vs LF, as \n or \r which also needs to be clear. Although as stated this didn't affect the .csv files. Good solution for Windows users is using Notepad++ when you can change the EOL from Windows to Unix. Use dos2unix in linux or macs. Also dos2unix installs on windows with Gitbash. I agree the GIT solution is not great for this section.

ChristinaLK commented 6 years ago

Thanks for adding @hoytpr. It sounds like it would be helpful to have someone confirm when this problem happens + then making sure the recommended fix is appropriate.

hoytpr commented 6 years ago

@ChristinaLK , I did some testing on the .csv cross-compatibilities of the different spreadsheets. I looked at Excel, Gnumeric, and Calc. I used a text file that was an old DNA sequence sample sheet with lots of commas. There were essentially no problems and the "/r" never rendered in any spreadsheet cell. Maybe this is a MAC thing as we don't have easy access to a MAC? Using Win10 I put the testing results in a slide deck at : https://drive.google.com/open?id=1e7A3JyKst-00cN_6EmhsEoLEddb70Mjg

The file I used for testing is at: https://drive.google.com/open?id=1nW9Z2jkp8X2V5Amgkj2xU_8Xy-VhjeO6 There is an easy way to convert between /n and /r in whole files using Nano (and how to tell which is being used). If anyone wants that info let me know.

hoytpr commented 4 years ago

From: https://stackoverflow.com/questions/82726/convert-dos-line-endings-to-linux-line-endings-in-vim

Open the file with nano: nano file.txt

Press CTRL+O to save, but before pressing Enter, press: ALT+D to toggle betwen DOS and Unix/Linux line-endings, or: ALT+M to toggle betwen Mac and Unix/Linux line-endings then press Enter to save and CTRL+X to quit.

hoytpr commented 4 years ago

Closed with PR #267