官术网_书友最值得收藏!

Getting ready

Recall that you have created several R objects in the prior recipes, such as vector, matrix, data frame, and array. Now, you are in a position to create another single R object that could contain all the objects that you have already created and then want to access those as needed. To get ready for this recipe, let's re-run those lines of code and create those objects again:

    cVec <- c("Cricket", "Football", "Basketball", "Rugby")
nVec <- c(1:10)
Lvec <- c(TRUE, FALSE, FALSE, TRUE)
matA <- matrix(1, nrow=2, ncol=2)
datA <- data.frame(ID = 1:5, hourSpetOnInternet = c(5,3,4,1,2),
GENDER = c("M", "F", "F", "M", "F"))
arrayA <- array(1:16, dim=c(2,2,4))

In this recipe, you will organize these heterogeneous objects into a single R object that is called list.

主站蜘蛛池模板: 炎陵县| 连平县| 乌拉特后旗| 凤山市| 昆明市| 金乡县| 太仓市| 德州市| 铁岭县| 荔波县| 二手房| 启东市| 连城县| 靖西县| 介休市| 梓潼县| 临清市| 武山县| 达拉特旗| 桐庐县| 偃师市| 彭州市| 师宗县| 昆明市| 旬阳县| 抚宁县| 军事| 霍林郭勒市| 巴林左旗| 和政县| 松滋市| 利辛县| 突泉县| 武宣县| 肥东县| 宣化县| 大关县| 平阳县| 林周县| 景德镇市| 黔南|