1

I am trying to read a scraped dataset stored in excel file. Once I loaded the file in RStudio, I checked the head(dataset, 5), but the columns of double values doesn't show full decimals, instead it shows:

100. 

However, if I use View(dataset), it still shows the full decimals:

100.23 

I tried this but it doesn't work:

options(digits=10)

I have a picture here: enter image description here

enter image description here

enter image description here Is there anyway to solve it?

ACuriousCat
  • 1,003
  • 1
  • 8
  • 21

1 Answers1

2

This is just the default way in which the console prints a tibble. If you want to see the full values, you can use print.data.frame:

head(leipzig[, "Shot_x1"]) %>% 
  print.data.frame()

or better, since there is no need to head() a tibble:

leipzig %>%
  select(Shot_x1) %>%
  print.data.frame()
neilfws
  • 32,751
  • 5
  • 50
  • 63