Hi.
I'm trying to write a code that removes all rows that only contain one word in them. E.g., if the object has 2 words, it should stay.
So in my data, I would like to remove row 1 and 5 since they have one word of column "Matchid".
data.frame(
stringsAsFactors = FALSE,
Sampleid = c("AVM_360","AVM_360","AVM_360",
"AVM_360","AVM_360","AVM_360","AVM_360","AVM_360",
"AVM_360"),
Currentid = c("Bibasis vasutana",
"Bibasis vasutana","Bibasis vasutana","Bibasis vasutana",
"Bibasis vasutana","Bibasis vasutana","Bibasis vasutana",
"Bibasis vasutana","Bibasis vasutana"),
Matchp = c("100.0","100.0","100.0",
"100.0","100.0","100.0","100.0","100.0","100.0"),
Matchid = c("Bibasis","Bibasis vasutana",
"Bibasis vasutana","Bibasis vasutana","Bibasis",
"Bibasis vasutana","Bibasis vasutana","Bibasis vasutana",
"Bibasis nikos")
)
thank you!!