Reputation: 35
I have a dataframe that looks a little like this:
slide | title | text
defautlt | No title | No text
With the top row being the header. I then want to retrieve the title value with this code.
text = "default"
slideText[slideText$slide == text,]$title
This return
character(0)
But when I use
slideText[slideText$slide == "default",]$title
It return "No title" as intended.
Upvotes: 1
Views: 34
Reputation: 35
This turned out to work:
slideText[slideText$slide == text,'title']
Thanks to dvd280
Upvotes: 0