Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 54

4.3.2 Vectors 4.3.2.1 Creating Vectors

Оглавление

Simply put, vectors are lists of objects that are all of the same type. They can be the result of a calculation or be declared with the function c().

vector

x <- c(2, 2.5, 4, 6) y <- c("apple", "pear") class(x) ## [1] "numeric" class(y) ## [1] "character"

More about lists can be found in Section 4.3.6 "Lists" on page 53.

The Big R-Book

Подняться наверх