Associate name with each value
examples/graphs/associate_name.R
fruits = c("Apple", "Banana", "Peach") nums = c(3, 7, 5) names(nums) = fruits print(nums["Peach"]) #print(class(nums["Peach"]))
Peach 5
barplot this!
fruits = c("Apple", "Banana", "Peach") nums = c(3, 7, 5) names(nums) = fruits print(nums["Peach"]) #print(class(nums["Peach"]))
Peach 5
barplot this!