Learn R Programming

rtemis (version 0.79)

seql: Sequence generation with automatic cycling

Description

Sequence generation with automatic cycling

Usage

seql(x, target)

Arguments

x

R object of some length

target

R object of some length

Examples

Run this code
# NOT RUN {
color <- c("red", "blue")
target <- 1:5
color[seql(color, target)]
# "red"  "blue" "red"  "blue" "red"
color <- c("red", "green", "blue", "yellow", "orange")
target <- 1:3
color[seql(color, target)]
# "red"   "green" "blue"
# }

Run the code above in your browser using DataLab