SQLDF newbie here.
I have a data frame that contains about 15,000 rows and 1 column. The data looks like this:
cars
autocar
carsinfo
whatisthat
donnadrive
car
telephone
...
I wanted to use the sqldf package to scroll through a column and select all the values that contain “car” anywhere at their cost. However, the following code generates an error.
> sqldf("SELECT Keyword FROM dat WHERE Keyword="car")
Error: unexpected symbol in "sqldf("SELECT Keyword FROM dat WHERE Keyword="car"
There is no unexpected symbol, so I'm not sure what happened.
So first, I want to know all the meanings containing "car". then I want to know only those values that contain only "car".
Can someone help.
EDIT:
In order, an unexpected symbol appeared, but it gives me only a car, and not everyone that contains a "car".
> sqldf("SELECT Keyword FROM dat WHERE Keyword='car'")
Keyword
1 car
source
share