有时候,我发现有一个像无证选择R里面的函数use.names中c:
x <- c(a = 1, b = 2, c = 3, d = 4)
y <- c(e = 5, f = 6, g = 7, e = 8, h = 9)
print(c(x, y))
# a b c d e f g e h
# 1 2 3 4 5 6 7 8 9
print(c(x, y, i = 10))
# a b c d e f g e h i
# 1 2 3 4 5 …Run Code Online (Sandbox Code Playgroud) r ×1