File: has_attr.Rd

package info (click to toggle)
r-cran-assertthat 0.1-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 188 kB
  • sloc: sh: 9; makefile: 1
file content (32 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\name{has_attr}
\alias{\%has_attr\%}
\alias{\%has_name\%}
\alias{has_attr}
\alias{has_name}
\title{Has attribute or name?}
\usage{
has_attr(x, which)

x \%has_attr\% which

has_name(x, which)

x \%has_name\% which
}
\arguments{
  \item{x}{object to test}

  \item{which}{name or attribute}
}
\description{
Has attribute or name?
}
\examples{
has_attr(has_attr, "fail")
x <- 10
x \%has_attr\% "a"

y <- list(a = 1, b = 2)
see_if(y \%has_name\% "c")
}