Rでまだ知らない関数に関してメモするスクラップ
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)
}
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
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)))
tigris
walkerke/tigris: Download and use Census TIGER/Line shapefiles in R
- アメリカ合衆国の国勢調査局が扱うTIGER/Line shapefileへのアクセスが可能
tidycensus
Load US Census Boundary and Attribute Data as tidyverse and sf-Ready Data Frames • tidycensus
- US Census and American Community Survey上の地理空間情報構造をもったデータをtidy形式で取得することが可能
sp::elide()
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.
nobs()
timestamp()
timestamp()
#> ##------ Wed May 28 05:29:19 2025 ------##
replicate()
replicate(5, 1+1)
#> [1] 2 2 2 2 2
par(mfrow=c(2,2))
replicate(4, {
x <- rbeta(5000, 1, 5)
y <- rbinom(5000, 1, x)
calib(y, x, sx = seq(min(x), max(x),
length.out=100))
})
A Recipe for Trellis/Faceted Plots Using Base R Graphics | R-bloggers