Skip to content

Instantly share code, notes, and snippets.

@kbroman
Created June 25, 2014 15:59
Show Gist options
  • Select an option

  • Save kbroman/9de8a498d3d8c812433c to your computer and use it in GitHub Desktop.

Select an option

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
sapply(read.csv("test1.csv"), is.numeric) # 2nd column is factor
sapply(read.csv("test2.csv"), is.numeric) # both columns numeric
x y
1 2
3 4
5 6.1234567890123456
7 8
x y
1 2
3 4
5 6.123456789012345
7 8
@kbroman

kbroman commented Jun 25, 2014

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment