После неправильного ввода имени столбца (без последней буквы) я заметил, что data.frame по-прежнему возвращает значения этого столбца.Пример:
dt <- data.frame(Column = LETTERS[1:10], Col = 1:10)
# Using the first 4 letters of the first column returns:
dt$Colu
[1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"
# Using the first 3 letters of first column/full column name of second
# column returns:
dt$Col
[1] 1 2 3 4 5 6 7 8 9 10
# using the first two letters of both columns (ambiguous) returns:
dt$Co
NULL
Мне просто интересно, является ли это ожидаемым поведением.
R3.5.0