sloop icon indicating copy to clipboard operation
sloop copied to clipboard

Bug in s3_dispatch

Open Tazinho opened this issue 3 years ago • 1 comments

(Probably due to a change in R 4.0; I discovered this when solving the regarding exercise in Adv R)

# Output in R 4.0.3
x <- structure(1:10, class = "test")

sloop::s3_dispatch(t(x))
#> => t.test
#>  * t.default
t(x)
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> [1,]    1    2    3    4    5    6    7    8    9    10
#> attr(,"class")
#> [1] "test"
t.test(x)
#> 
#>  One Sample t-test
#> 
#> data:  x
#> t = 5.7446, df = 9, p-value = 0.0002782
#> alternative hypothesis: true mean is not equal to 0
#> 95 percent confidence interval:
#>  3.334149 7.665851
#> sample estimates:
#> mean of x 
#>       5.5

Created on 2020-12-31 by the reprex package (v0.3.0)

Tazinho avatar Dec 31 '20 14:12 Tazinho