Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (398)
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, 291🔥, 0💬
Popular Posts:
How to create a command button to run my macro in slide show in PowerPoint? I have created a macro t...
How to add a new slide master in PowerPoint? I have 2 slide masters in the current template. They co...
How can I create a Personal Folders File (.pst) to store messages, contacts and other types of Outlo...
How to open a Web Archive (.mht or .mhtml) file correctly in Firefox browser? I converted a word doc...
How register my Fitbit device through Fitbit Connect? I have an account with Fitbit server, installe...