keyword: Adwords Keyword

Description Usage Arguments Value Examples

View source: R/keyword.R

Description

Creates or coerces S3 objects of type keyword for the Adwords API. is.keyword will test if an object is interpretable as a keyword.

Usage

 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)

Arguments

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.

Value

A S3 object of type keyword.

Examples

 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)

adviso/RAdwordsPlus documentation built on Dec. 5, 2019, 3:11 a.m.