Browsing resource, all submissions are temporary.
a. Run the command plot(1:26,1:26,pch=1:26) (if you haven't tried already) and compare it with the command
plot(1:26,1:26,pch=1:26)
plot(1:26,1:26,pch=as.character(1:26))
Which of the following is the best description of the second plot? The points are plotted as 1, 2, 3, ..., 26. The first 9 points are plotted as 1, 2, 3, ..., 9; the next 10 points are plotted as 1; the last 7 points are plotted as 2. It's exactly the same as the first plot. Each of the 26 points is represented by a unique symbol.
b. Run the command plot(1:26,1:26,pch=letters). What do you see? Each of the 26 points is plotted with a different color. The 26 points are plotted as lower-case letters a, b, c, ..., z. The first 9 points are plotted as 1, 2, 3, ..., 9; the next 10 numbers are plotted as 1; the last 7 points are plotted as 2. The 26 points are plotted as capital letters A, B, C, ..., Z. An error message.
plot(1:26,1:26,pch=letters)
c. Run the command plot(1:26,1:26,pch=LETTERS). What do you see? Each of the 26 points is plotted with a different color. An error message. The 26 points are plotted as capital letters A, B, C, ..., Z. The first 9 points are plotted as 1, 2, 3, ..., 9; the next 10 numbers are plotted as 1; the last 7 points are plotted as 2. The 26 points are plotted as lower-case letters a, b, c, ..., z.
plot(1:26,1:26,pch=LETTERS)
d. Run the command plot(1:26,1:26,pch='abcdefghijklmnopqrstuvwxyz'). What do you see? The 26 points are plotted as lower-case letters a, b, c, ..., z. Each of the 26 points is plotted with a different symbol. The 26 points are plotted as capital letters A, B, C, ..., Z. An error message. All points are plotted as 'a'.
plot(1:26,1:26,pch='abcdefghijklmnopqrstuvwxyz')
e. Run the commands
char <- c('abc','ABC','*113','%p','#1176;','!god','@illinois.edu','[Stat390]','|x|','?plot','^5','&-03','++') plot(1:26,1:26,pch=char)
What do you see? The first 13 points are plotted as the symbols 'a', 'A', '*', '%' ,'#', '!', '@', '[', '|', '?', '^', '&', '+'. These 13 symbols are repeated for the next 13 points. An error message. All points are plotted as 'a'. Each of the 26 points is plotted with a different symbol. None of the above.