Skip to contents

Tests whether each value of a link's rel attribute contains the nofollow token. Values are lowercased and split on commas and whitespace, so "ugc nofollow" and "nofollow,ugc" both count.

Usage

sf_rel_nofollow(x)

Arguments

x

A vector (typically character) of rel attribute values.

Value

A logical vector the same length as x: TRUE when the nofollow token is present, FALSE when it is not, and NA for blank strings or NA input.

Examples

sf_rel_nofollow(c("nofollow", "ugc nofollow", "sponsored", "", NA))
#> [1]  TRUE  TRUE FALSE    NA    NA