Open10

Rでまだ知らない関数に関してメモするスクラップ

yuuyuu

ggplot2::median_hilow()

とりあえずヘルプのコードとタイトルを記載

# Title: A selection of summary functions from Hmisc
if (requireNamespace("Hmisc", quietly = TRUE)) {
  set.seed(1)
  x <- rnorm(100)
  mean_cl_boot(x)
  mean_cl_normal(x)
  mean_sdl(x)
  median_hilow(x)
}
yuuyuu

drop()関数

Value
If x is an object with a dim attribute (e.g., a matrix or array), then drop returns an object like x, but with any extents of length one removed. Any accompanying dimnames attribute is adjusted and returned with x: if the result is a vector the names are taken from the dimnames (if any). If the result is a length-one vector, the names are taken from the first dimension with a dimname.

Array subsetting ([) performs this reduction unless used with drop = FALSE, but sometimes it is useful to invoke drop directly.

# Drop Redundant Extent Information
drop(1:3 %*% 2:4)
#> 20
yuuyuu

scales::muted()

show_col(c("red", "blue", muted("red"), muted("blue")))

show_col(c("red", muted("red"),muted("red", l = 60),muted("red", c = 20)))

yuuyuu

missingArg()

  • Utility functions to support the definition and use of formal methods. Most of these functions will not normally be called directly by the user.
yuuyuu

timestamp()

timestamp()
#> ##------ Wed May 28 05:29:19 2025 ------##