I have a data frame in R like so called UK_profiles
:
row.names id name
1 1 8131437 Profile
2 2 8131719 WolverineCompetition
3 4 8132011 www.vaseline.com
4 10 23265829 www.keepingskinamazing.co.uk
5 23 8042743 Mobile
6 24 8043312 Test
7 25 90914664 Join Our Core
8 26 45272695 UDF
9 27 50547829 apps.euro-bureau.eu/fairathon
10 28 50916438 www.benjerry.intashop.com/
11 44 83667343 All Web Site Data
12 45 84556272 UK
Using dplyr I wish to filter
and delete rows with grepl
using:
require(dplyr)
UK_profiles.filtered <- filter(UK_profiles, !grepl("Rollup|Microsite|Mobile|Test|tset|Profile|Facebook|Unfiltered|returnurl", name))
However, I get an error saying:
object 'name' not found.
I also get:
In data.matrix(data) : NAs introduced by coercion.
The object 'name'
is clearly in the dataframe. Can someone please help?