forked from swirldev/swirl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
var_is_a.Rd
37 lines (35 loc) · 971 Bytes
/
var_is_a.Rd
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
33
34
35
36
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/answerTests2.R
\name{var_is_a}
\alias{var_is_a}
\title{Test that the value of the expression is of a specific class.}
\usage{
var_is_a(class, var_name)
}
\arguments{
\item{class}{expected class which the given variable}
\item{var_name}{name of the variable}
}
\value{
\code{TRUE} or \code{FALSE}
}
\description{
Returns \code{TRUE} if a variable of the given name exists
in the global environment and is of the given class.
}
\examples{
\dontrun{
# Test that a variable named "x" in the global environmentis numeric.
var_is_a('numeric', 'x')
}
}
\seealso{
Other AnswerTests: \code{\link{AnswerTests}};
\code{\link{any_of_exprs}};
\code{\link{expr_creates_var}};
\code{\link{expr_identical_to}}; \code{\link{expr_is_a}};
\code{\link{expr_uses_func}};
\code{\link{func_of_newvar_equals}};
\code{\link{omnitest}}; \code{\link{val_has_length}};
\code{\link{val_matches}}
}