# NOT RUN {
singleword_valid(sample(1:9))
# }
# NOT RUN {
singleword_valid(c(5,6,3,9,7,8,2,1)) # returns an error (no '4')
singleword_valid(c(5,6,3,4,9,7,8,2,1)) # returns an error (not integer)
# }
# NOT RUN {
cyclist_valid(list(c(1,8,2),c(3,6))) # should be TRUE
singleword_valid(c(5L,6L,3L,4L,9L,7L,8L,2L,1L)) # should be TRUE
# }
# NOT RUN {
cyclist_valid(list(c(1,8,2),c(8,6))) # returns an error ('8' is repeated)
# }
Run the code above in your browser using DataCamp Workspace