I'm new to R programming and I'm trying to create a frequency bar chart using base graphics. I am passing a vector called info which contains 50 items. Each item is of type character.
plot(x = info,
main = "My title",
xlab = "Items",
ylab = "Count")
When I run this I get an error.
Error in plot.window(...) : need finite 'ylim' values.
I thought it might have something to do with the amount of items in the vector, so I reduced the items to 10 inside the vector called info. But the same error keeps coming up.
The character items inside the vector are anything from 20 characters in length to 60. Some of them contain commas and brackets, I'm not sure if this is an issue?
Any help greatly appreciated.
Update
Examples of the characters in the vector.
"This is some data"
"This is another example (testing)"
"This is yet, another, example (testing)"