We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using $ to extract columns is dangerous due to partial matching. the wrong columns may inadvertently be extracted.
$
> library(data.table) > DT <- data.table(col1 = letters, col20 = LETTERS) > DT$col2 [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z"
Ensure that columns are extracted using data.table syntax ([["colName"]]):
[["colName"]]
> DT[["col2"]] NULL > DT[["col20"]] [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
using
$
to extract columns is dangerous due to partial matching. the wrong columns may inadvertently be extracted.Ensure that columns are extracted using data.table syntax (
[["colName"]]
):The text was updated successfully, but these errors were encountered: