3

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
  • If you are not familiar with R's operator precedence, check out the ?Syntax help page.
    – MrFlick
    Sep 22, 2021 at 23:42

1 Answer 1

4

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.