最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

R -- 數(shù)據(jù)分析,表格制作,excel, table

2022-03-06 13:27 作者:六月忘了看太陽(yáng)  | 我要投稿

data(“PlantGrowth”)??數(shù)據(jù)

第一步:生成分類變量

PG= PlantGrowth%>%

mutate(weight_cat=case_when(

??weight<=4.5~”light”,

??weight>4.5&weight<=5.5~”medium”,

??weight>5.5~”heavy”

??))

第二步:制表

tab_count1=table(PG$group,PG$weight_cat)

第三步:增加表總數(shù)的行列

tab_count2=addmargins(tab_count1,1) 1為行,2為列

第四步:生成百分比

tab_per1=prop.table(tab_count2,1)*100

tab_count3=addmargins(tab_per1,2

tab_per2=addmargins(tab_per1,2)

第五步:將tab_count3與tab_per2合成一個(gè)表格

tab_combine=matrix(

??pasteq(tab_count3,”(“,round(tab_per2,2),”%”),

??dim(tab_count3),

??dimnames=dimnames(tab_count3)

??)

R -- 數(shù)據(jù)分析,表格制作,excel, table的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
四川省| 涪陵区| 衡阳县| 阳山县| 南郑县| 隆化县| 漳平市| 中牟县| 乌拉特中旗| 高淳县| 平凉市| 贵港市| 边坝县| 石阡县| 金堂县| 东安县| 大渡口区| 通州市| 乌审旗| 龙江县| 平邑县| 繁峙县| 永宁县| 晋城| 海南省| 蒲江县| 夏河县| 鄂温| 惠州市| 色达县| 兖州市| 青浦区| 湖北省| 杭锦后旗| 南郑县| 桑植县| 镇宁| 岳阳市| 武山县| 胶州市| 鄢陵县|