Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

named vectors #49

Closed
jeroen opened this Issue Oct 22, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@jeroen
Copy link
Member

jeroen commented Oct 22, 2012

Is this intended behavior?

> (x <- unlist(list(foo=TRUE)))
 foo 
TRUE 
> expect_true(x)
Error: x isn't true
@hadley

This comment has been minimized.

Copy link
Member

hadley commented Oct 22, 2012

Hmmm, good question. It uses identical for the test

@jeroen

This comment has been minimized.

Copy link
Member Author

jeroen commented Oct 22, 2012

Maybe use identical(unname(x), TRUE) or something?

R likes to carry around names, but that won't affect the meaning of a TRUE I guess.

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Mar 20, 2013

Maybe identical(as.vector(x), TRUE)? That will strip all attributes.

@hadley hadley closed this in b5aec72 Mar 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.