全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
83368 6
2014-02-05
如题,请高手指教。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-2-5 10:17:50
插入一列
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-2-5 10:22:49
插入一行
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-2-5 10:42:31
install.package(miscTools)
library(miscTools)

#insertRow Insert Row into a Matrix
Description
Insert a new row into a matrix.
Usage
insertRow( m, r, v = NA, rName = "" )
Arguments
m matrix.
r row number where the new row should be inserted.
v optional values for the new row.
rName optional character string: the name of the new row.
#Examples
m <- matrix( 1:4, 2 )
insertRow( m, 2, 5:6 )

###insertCol Insert Column into a Matrix
Description
Insert a new column into a matrix.
Usage
insertCol( m, c, v = NA, cName = "" )
Arguments
m matrix.
c column number where the new column should be inserted.
v optional values of the new column.
cName optional character string: the name of the new column
##Examples
m <- matrix( 1:4, 2 )
insertCol( m, 2, 5:6 )

注:首先要把你的数据框变成矩阵格式;然后安装并调用miscTools包;按照上面的提示,湖综合学习miscTools的说明文件。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-2-5 23:52:10
dxystata 发表于 2014-2-5 10:17
插入一列
多谢多谢,很有帮助
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-2-6 00:10:48
nieqiang110 发表于 2014-2-5 10:42
install.package(miscTools)
library(miscTools)
多谢多谢,很有帮助
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群