Description Usage Arguments Value Examples
Creates or coerces S3 objects of type keyword
for the Adwords API.
is.keyword
will test if an object is interpretable as a keyword.
1 2 3 4 5 6 7 8 9 10 11 12 13 | keyword(text, match.type = "BROAD", keyword.id = NULL,
type = "Keyword")
as.keyword(x, ...)
## S3 method for class 'data.frame'
as.keyword(x, keyword.id, match.type = NULL,
type = "Keyword")
## Default S3 method:
as.keyword(x, ...)
is.keyword(x)
|
text |
Text of the keyword. |
match.type |
Either "BROAD", "PHRASE" or "EXACT". |
keyword.id |
The ID for the keyword, unsuported in the Adwords keyword traffic estimator service. When converting a data frame, this parameter will override the existing column with keyword ids, remove it if NULL or leave the column intact if missing (which is the default). |
type |
Placeholder for the keyword type, unsuported for now. |
A S3 object of type keyword.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Simplest case
k1 <- keyword("Example")
# Adding a match type
k2 <- keyword("Example", "EXACT")
# Creating multiple keywords
k3 <- keyword(c("Example", "Sample", "Test", "Only a test"), match.type = "PHRASE")
# Creating multiple keywords with different match types
k4 <- keyword(c("Example", "Sample", "Test", "Only a test"), match.type = c("PHRASE", "BROAD", "EXACT", "BROAD"))
# Coercing to a keyword
k5 <- as.keyword(911)
# Checking a keyword
is.keyword(k5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.