powered by
Toggle boolean values in a vector.
flip(x)
Invisibly returns NULL.
NULL
A CppVector object of type boolean.
Sets TRUE to FALSE and FALSE to TRUE.
cpp_vector.
v <- cpp_vector(c(TRUE, TRUE, FALSE)) v # TRUE TRUE FALSE flip(v) v # FALSE FALSE TRUE
Run the code above in your browser using DataLab