- Modern R Programming Cookbook
- Jaynal Abedin
- 153字
- 2021-07-08 09:48:34
Converting a matrix to a data frame and a data frame to a matrix
A matrix is a two-dimensional arrangement of data with rows and columns where each row/column is of the same data type, either all numeric, all character, or all logical. Moreover, the number of elements in each column should be the same, and the number of elements in each row should also be the same.
A data frame is also a two-dimensional arrangement of data with rows and columns, but each column could be of very different types; for example, a data frame may contain both character and numeric columns. However, the number of elements in each column should be the same. Since both data structures share some common properties, they could be converted from one structure to another. In this recipe, you will learn to convert a matrix to a data frame and a data frame to a matrix.
- Java程序設(shè)計(jì)與開(kāi)發(fā)
- 樂(lè)學(xué)Web編程:網(wǎng)站制作不神秘
- OpenCV 3和Qt5計(jì)算機(jī)視覺(jué)應(yīng)用開(kāi)發(fā)
- MySQL數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- 軟件項(xiàng)目管理實(shí)用教程
- Scala程序員面試算法寶典
- ANSYS Fluent 二次開(kāi)發(fā)指南
- 深入分布式緩存:從原理到實(shí)踐
- Orleans:構(gòu)建高性能分布式Actor服務(wù)
- IDA Pro權(quán)威指南(第2版)
- 深入實(shí)踐DDD:以DSL驅(qū)動(dòng)復(fù)雜軟件開(kāi)發(fā)
- Swift 2 Design Patterns
- 數(shù)據(jù)結(jié)構(gòu)與算法詳解
- SQL Server 2014數(shù)據(jù)庫(kù)設(shè)計(jì)與開(kāi)發(fā)教程(微課版)
- 前端Serverless:面向全棧的無(wú)服務(wù)器架構(gòu)實(shí)戰(zhàn)