What is the difference between these two lines of codes?

Viewed 56

What is the difference between these two? Why do they have different outputs? Thanks!

(66.2-65)/(4.2/8) %>%
  pt(63)

((66.2-65)/(4.2/8)) %>%
  pt(63)
1 Answers

In the first case (4.2/8) %>% pt(63) happens first. Let

a <- (66.2-65)
b <- (4.2/8)

Case 1

(66.2-65)/(4.2/8) %>% pt(63)
[1] 1,716034

a/pt(b,63)
[1] 1,716034

Case 2

((66.2-65)/(4.2/8)) %>% pt(63)
[1] 0,987177

pt(a/b,63)
[1] 0,987177

So, we have a/pt(b,63) x pt(a/b,63)

Related