R语言.如何构成这个向量如何用more.colors这个向量,rep() 和 seq() 构成以下的向量"red" "yellow" "blue" "yellow" "blue" "green""blue" "green" "magenta" "green" "magenta" "cyan"

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 06:15:17

R语言.如何构成这个向量如何用more.colors这个向量,rep() 和 seq() 构成以下的向量"red" "yellow" "blue" "yellow" "blue" "green""blue" "green" "magenta" "green" "magenta" "cyan"
R语言.如何构成这个向量
如何用more.colors这个向量,rep() 和 seq() 构成以下的向量
"red" "yellow" "blue" "yellow" "blue" "green"
"blue" "green" "magenta" "green" "magenta" "cyan"

R语言.如何构成这个向量如何用more.colors这个向量,rep() 和 seq() 构成以下的向量"red" "yellow" "blue" "yellow" "blue" "green""blue" "green" "magenta" "green" "magenta" "cyan"
首先把more.colors赋上所有的颜色
>more.colorsindmore.colors[ind]
[1] "red" "yellow" "blue" "yellow" "blue" "green" "blue" "green" "magneta" "green" "magenta" "cyan"