# NOT RUN {
# generate a permutation in *word* form:
x <- rperm(4,9)
# default behaviour is to print in cycle form irregardless:
x
# change default using options():
options(print_word_as_cycle=FALSE)
# objects in word form now printed using matrix notation:
x
# printing of cycle form objects not altered:
as.cycle(x)
# restore default:
options(print_word_as_cycle=TRUE)
as.character_cyclist(list(1:4,10:11,20:33)) # x a cyclist;
as.character_cyclist(list(c(1,5,4),c(2,2))) # does not check for consistency
as.character_cyclist(list(c(1,5,4),c(2,9)),comma=FALSE)
# }
Run the code above in your browser using DataCamp Workspace