How to turn a list into a vector without a nameHow to turn a list into a vector, and at the same time the name of the list becomes a member of the vector

# Sample named list
named_list <- list(a = 1, b = 2, c = 3)

# Convert named list to unnamed vector
unnamed_vector <- unname(named_list)

# Print the unnamed vector
print(unnamed_vector)

Guess you like

Origin blog.csdn.net/qq_52813185/article/details/131928481