# NOT RUN {
stage <- new_projects_stage("4: manuscript")
as.integer(stage) # 4
stage == 4 # TRUE
stage != 4 # FALSE
stage < 6 # TRUE
stage %in% c(3:6) # TRUE
match(stage, 0:4) # 5
stage %in% c("design", "manusc", "idea") # TRUE
more_stages <- new_projects_stage(c("0: idea", "4: manuscript", "1: design"))
match("MAnuscRIPT", more_stages) # 2
x <- structure("7: redacted", class = "dummyclass")
class(c(x)) # Does not retain class
class(c(stage, more_stages)) # Retains class
# }
Run the code above in your browser using DataLab