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

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.

主站蜘蛛池模板: 海丰县| 合肥市| 东乌| 上饶市| 阿拉善左旗| 甘南县| 朔州市| 万荣县| 恭城| 特克斯县| 大方县| 巩义市| 乌苏市| 聂拉木县| 原阳县| 满洲里市| 蓝山县| 海安县| 探索| 垣曲县| 临高县| 辽阳县| 甘泉县| 马鞍山市| 南郑县| 法库县| 涟源市| 吴旗县| 聂荣县| 濮阳县| 南部县| 航空| 花莲县| 通化市| 晴隆县| 云安县| 万山特区| 铜川市| 玛多县| 阿城市| 明光市|