Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Data Structure - Named Vector
What is a named vector?
✍: FYIcenter.com
A named vector is a special vector where each member
has a unique name.
A name vector is an associated array in many other programming language.
1. Create a named vector object with the name() function -
> v = c("Apple", "Banana", "Orange")
> v
[1] "Apple" "Banana" "Orange"
> names(f) = c("First", "Second", "Third")
> v
First Second Third
"Apple" "Banana" "Orange"
2. Get members by index and by name -
> v["Second"] Second "Banana" > f[2] Second "Banana"
2023-06-11, ∼1542🔥, 0💬
Popular Posts:
Why am I getting the "You now have two copies of a file" error from OneDrive for Windows? You will g...
Where to find answers to frequently asked questions on Facebook? I want to know how to know how to u...
How to convert slide files created with older versions of PowerPoint to the current PowerPoint? I ha...
How to add slide numbers and copyright in the footer area? You can add slide numbers, copyright text...
What do those Fitbit icons mean? Over the years, Fitbit has used a number of icons on their wearable...