[] = always returns object of same class (out of basic object classes), can select more than one element of an object
[[]] = can extract one element from list or data frame, returned object (out of basic object classes) not necessarily list/dataframe
More Related Contents:
- Grouping functions (tapply, by, aggregate) and the *apply family
- Create a sequential number (counter) for rows within each group of a dataframe [duplicate]
- Extracting specific columns from a data frame
- Can dplyr package be used for conditional mutating?
- Faster version of combn
- Subset a dataframe between 2 dates
- Assign multiple objects to .GlobalEnv from within a function
- What does .SD stand for in data.table in R
- How to move cells with a value row-wise to the left in a dataframe [duplicate]
- rep() with each equals a vector
- ggplot2 geom_bar – how to keep order of data.frame [duplicate]
- Memory Allocation “Error: cannot allocate vector of size 75.1 Mb” [duplicate]
- How do I install an R package from the source tarball on windows?
- Remove rows in R matrix where all data is NA [duplicate]
- Using cbind on an arbitrarily long list of objects
- Delete “” from csv values and change column names when writing to a CSV
- Fully reproducible parallel models using caret
- Common legend for multiple plots in R
- What’s the difference between integer class and numeric class in R
- Replace duplicated elements with NA, instead of removing them
- RMarkdown: How to end tabbed content
- reading global variables using foreach in R
- Group by using base R
- Rstudio is duplicating commands in the command line
- list members can be accessed with partial name? Is this a feature?
- Stop lapply from printing to console
- R how can I calculate difference between rows in a data frame
- Preserve proportion of graphs using grid.arrange
- Knit one markdown file to two output files
- Display HTML file in Shiny App