A of mode character is input with single or double quotes. The echo is always double quotes. > A <- "bacteria" > B <- ‘E.coli’ > A; B [1] "bacteria" [1] "E. coli" The backslash (\) can be used to a special character. The two “escape” characters altogether will be treated in a specific way by some \" functions such as cat for display on screen: > x <- "Double quotes \" delimitate R’s strings." > x [1] "Double quotes \" delimitate R’s strings." > cat(x) Double quotes " delimitate R’s strings. Double quotes " delimitate R’s strings. The following table gives an overview of the type of objects representing data. several modes possible in the same object modes object? vector numeric, No character, complex or logical factor numeric No or character
A of mode character is input with single or double quotes. The echo is always double quotes. > A <- "bacteria" > B <- ‘E.coli’ > A; B [1] "bacteria" [1] "E. coli" The backslash (\) can be used to “escape” a special character. The two characters altogether \" will be treated in a specific way by some functions such as cat for display on screen: > x <- "Double quotes \" delimitate R’s strings." > x [1] "Double quotes \" delimitate R’s strings." > cat(x) Double quotes " delimitate R’s strings. Double quotes " delimitate R’s strings. The following table gives an overview of the type of objects representing data. object modes several modes possible in the same object? vector numeric, character, complex or logical No factor numeric or character No
r_i_intro.docx