Associate name with each value
fruits = c("Apple", "Banana", "Peach")
nums = c(3, 7, 5)
names(nums) = fruits
print(nums["Peach"])
#print(class(nums["Peach"]))
{% embed include file="src/examples/graphs/associate_name.out)
barplot this!
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
fruits = c("Apple", "Banana", "Peach")
nums = c(3, 7, 5)
names(nums) = fruits
print(nums["Peach"])
#print(class(nums["Peach"]))
{% embed include file="src/examples/graphs/associate_name.out)
barplot this!