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, ∼1885🔥, 0💬
Popular Posts:
How to use my iPhone and iPad to set up and manage Chromecast device on my TV? I have a Chromecast d...
"Muss i denn" is a German folk song in the Swabian German dialect. The present form dates back to 18...
How to view dynamic field codes in Microsoft Word? Each dynamic value is Microsoft Word is driven by...
What is "OneNote Linked Notes Add-in" in Microsoft Word? Should I disable it? "OneNote Linked Notes ...
How to fix the Microphone Permissions error with making a call with Messenger in iPhone? If your Mic...