- Home
- Interview Questions
- R Programming
list(alpha = 1, list(beta = 2, gamma = 3, delta = 4), eta = NULL)
## $alpha
## [1] 1
##
## [[2]]
## [[2]]$beta
## [1] 2
##
## [[2]]$gamma
## [1] 3
##
## [[2]]$delta
## [1] 4
##
##
## $eta
## NULL
3. The inner list counts as one element, and so does the NULL element.
When passing arguments to functions, when calling formals, or in the global environment variable .Options.
You can use matrix-style indexing with pairs of positive integers/negative integers/ logical values/characters in single square brackets. You can also use list-style indexing with one index value inside single or double square brackets, or the dollar sign ($) operator. Thirdly, you can call the subset function.
By passing check.names = FALSE to data.frame.
rbind for appending vertically or cbind for appending horizontally.
The user workspace.
list2env is the best solution, but as.environment also works.
Just type its name.
formals, args, and formalArgs.
do.call calls a function with its arguments in a list form.