Created
June 25, 2014 15:59
-
-
Save kbroman/9de8a498d3d8c812433c to your computer and use it in GitHub Desktop.
read.csv in R ver 3.1.0 doesn't want to round numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sapply(read.csv("test1.csv"), is.numeric) # 2nd column is factor | |
| sapply(read.csv("test2.csv"), is.numeric) # both columns numeric |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x | y | |
|---|---|---|
| 1 | 2 | |
| 3 | 4 | |
| 5 | 6.1234567890123456 | |
| 7 | 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x | y | |
|---|---|---|
| 1 | 2 | |
| 3 | 4 | |
| 5 | 6.123456789012345 | |
| 7 | 8 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also Ethan White's gist.
And this set of tweets.
And this set of R-devel emails.