News for hackers. Stuff that matters.
Re:Why do we use R rather than Excel? by temp8964 on Sunday July 11, 2021 @09:57AM (#27800834)
Actually when you use R functions to import CSV files, they also guess data types and make some conversions by default. The difference is that in R you can turn them off if you want to. But in Excel there are automatic changes you can't turn off.
Re:Why do we use R rather than Excel? by HPsquared on Sunday July 11, 2021 @10:01AM (#27800867)
You can set the data type to "text" when importing CSVs, that turns most things off.
Re:Why do we use R rather than Excel? by croes on Sunday July 11, 2021 @10:32AM (#27801120)
If you try reading an Excel file via SSIS you are out of luck. You can't turn of the auto guessing feature.
Re:Why do we use R rather than Excel? by corty on Sunday July 11, 2021 @10:07AM (#27800917)
Most, but not all. That is the entire point: Excel is never safe in any configuration.
Re:Why do we use R rather than Excel? by FabHK on Sunday July 11, 2021 @10:12AM (#27800976)
Not sure about that. It is my understanding that Excel only tries to guess the type of an input if it has not been explicitly specified by the user.

The problem with "things that look like dates being interpreted as dates" comes from not specifying that a column has type "text".

Re:Why do we use R rather than Excel? by Xelbair on Sunday July 11, 2021 @12:11PM (#27802019)
Even if you do specify a column as a text excel WILL assume that it contains dates sometimes.

Happened to me multiple times, even when i set each cell as a text.

Seems like copypasting a tab separated values resets the cells to their default state.

Re:Why do we use R rather than Excel? by crazygringo on Sunday July 11, 2021 @10:23AM (#27801061)
If "not all", can you provide an example of what gets converted if you specify text?

Just want to know to avoid future gotchas.

Re:Why do we use R rather than Excel? by HPsquared on Sunday July 11, 2021 @02:03PM (#27803137)
I'm not sure, have to try it out but text fields can be delineated by starting with a single quote ('), that might be a special case. It might not be though, I don't have Excel open to check. Pretty much everything is left alone if you specify "text" at the import stage though. (This is using the text import wizard, or text-to-columns)
Re:Why do we use R rather than Excel? by capnahab on Sunday July 11, 2021 @11:52AM (#27801806)
As a total R beginner I was hugely put off by the complexities of data cleansing especially columns with ?different data types.