Open AhmedRashwanASU opened 2 years ago
I was trying to save these results as a vector in order to split the results into words, however, it doesn't return.
What did you try?
I'm not sure that I understand your question.
If you want to preview the titles identified by your expression you can use:
grep( "expression", d$title, value=T, ignore.case=TRUE )
Which would be the same as:
d$title[ question ] # subset titles by logical vector
A logical vector is a vector, though. It can be treated as a categorical variable.
length( questions ) # should be the same as nrow( d )
I was overriding the same object twice with the same name which resulted output = vector (0) ,
grep( "expression", d$title, value=T, ignore.case=TRUE )
I Tired this now and it worked, thanks prof
How can we Save the below results as a vector, not a logical expression, so that can be used for analysis?
Questions <- grepl("\?", d$title) Questions = returns T AND F
I was trying to save these results as a vector in order to split the results into words, however, it doesn't return.