继续上题,为了程序编写简洁,要给数据框x中的6列重新命名为x1,x2,x3,x4,x5,x6,应该使用的命令是()
A: ColNames(x) <- c("x1","x2","x3","x4","x5","x6")
B: Names(x) <- c("x1","x2","x3","x4","x5","x6")
C: colnames(x) <- c("x1","x2","x3","x4","x5","x6")
D: colname(x) <- c("x1","x2","x3","x4","x5","x6")
A: ColNames(x) <- c("x1","x2","x3","x4","x5","x6")
B: Names(x) <- c("x1","x2","x3","x4","x5","x6")
C: colnames(x) <- c("x1","x2","x3","x4","x5","x6")
D: colname(x) <- c("x1","x2","x3","x4","x5","x6")
举一反三
- int x = 3,y = 4;以下哪条输出语句正确? A: Console.WriteLine("x={x},y={y}", x,y); B: Console.WriteLine("x={x},y={y}"); C: Console.WriteLine("x={0},y={1}", x,y); D: Console.WriteLine("x={1},y={2}", x,y);
- 设有定义:double x=2.12;,以下不能完整输出变量x值的语句是( )。 A: printf("x=%5.0f ",x); B: printf("x=%f ",x); C: printf("x=%lf ",x); D: printf("x=%0.5f ",x);
- 设有定义:long x=-123456L;,则能够正确输出变量x值的语句是 A: printf("x=%d ",x); B: printf("x=%ld ",x); C: printf("x=%8dL ",x); D: printf("x=%LD",x);
- 设有定义: double x=2.12;,以下不能完整输出变量x值的语句是( )。 A: printf("x=%5.0f ", x); B: printf("x=%f ",x); C: printf("x=%lf ",x); D: printf("x=%0.5fn"x);
- 若有int x=50;,则下列语句( ) 会输出“50%”。? printf("%d%%");|printf("%d%%",x);|printf("%%d",x);|printf("%d%",x);