Loading rdata with RStudio returns values without decimals


I am trying to load a data set from DeVore statistics textbook into RStudio with the code

load(paste(pth, "CH10/exp10-1.rdata", sep=""))

Then, to look at the data I write


and get

strength box_type

1 655 1
2 788 1
3 734 1

However the data set contains decimals that are not showing in RStudio.

When I use the same code wit R running in a terminal I get

strength box_type
1 655.5 1
2 788.3 1
3 734.3 1

I have been searching for a solution or an explanation in the web without any luck


Check options("digits") in each environment... compare:

options(digits = 0)
options(digits = 3)

(note that the change is temporary; restart R/RStudio to return to your system's default.)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.