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

Warning – Changing data types

Оглавление

While R allows to change the type of a variable, doing so is not a good practice. It makes code difficult to read and understand.

# Avoid this: x <- 3L # x defined as integer x ## [1] 3 x <- "test" # R changes data type x ## [1] "test"

So, keep your code tidy and to not change data types.

The Big R-Book

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