{"id":56052,"date":"2024-06-16T17:25:51","date_gmt":"2024-06-16T09:25:51","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=56052"},"modified":"2024-06-16T17:25:51","modified_gmt":"2024-06-16T09:25:51","slug":"tidyr%e5%b8%a6%e4%bd%a0%e6%90%9e%e5%ae%9a%e9%95%bf%e5%ae%bd%e6%a0%bc%e5%bc%8f%e8%bd%ac%e6%8d%a2","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=56052","title":{"rendered":"tidyr\u5e26\u4f60\u641e\u5b9a\u957f\u5bbd\u683c\u5f0f\u8f6c\u6362"},"content":{"rendered":"<p><html><br \/>\n<head><br \/>\n<title><\/title><br \/>\n<meta charset=\"utf-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover\"><\/p>\n<style>\n*{margin:0;padding:0}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.6}img{z-index:999;position:relative;max-width:100%;margin:10px 0;}body{letter-spacing:.034em}h1,h2,h3,h4,h5,h6{font-weight:400;font-size:16px}a{color:#576b95;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}td,th{word-wrap:break-word;padding:5px 10px;border:1px solid #DDD;}table{margin-bottom:10px;border-collapse:collapse;display:table;width:100%!important;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}.rich_media_area_primary{padding:20px 16px 12px;background-color:#fafafa}@media (max-width:375px){.rich_media_area_primary{padding:20px 60px 15px 60px}.rich_media_area_extra{padding:0 60px 21px 60px}}@media (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner,body{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media{padding:20px;overflow:hidden;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}@media screen and (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media_content{overflow:hidden;color:#333;font-size:17px;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-align:justify;position:relative;z-index:0}.rich_media_content *{max-width:100%!important;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;word-wrap:break-word!important}.rich_media_content p{clear:both;min-height:1em}.rich_media_content em{font-style:italic}.rich_media_content fieldset{min-width:0}.rich_media_content .list-paddingleft-1,.rich_media_content .list-paddingleft-2,.rich_media_content .list-paddingleft-3{padding-left:2.2em}.rich_media_content .list-paddingleft-1 .list-paddingleft-2,.rich_media_content .list-paddingleft-2 .list-paddingleft-2,.rich_media_content .list-paddingleft-3 .list-paddingleft-2{padding-left:30px}.rich_media_content .list-paddingleft-1{padding-left:1.2em}.rich_media_content .list-paddingleft-3{padding-left:3.2em}.rich_media_content .code-snippet,.rich_media_content .code-snippet__fix{max-width:1000%!important}.rich_media_content .code-snippet *,.rich_media_content .code-snippet__fix *{max-width:1000%!important}.rich_media_title{font-size:22px;line-height:1.4;margin-bottom:13px;padding-bottom:13px;border-bottom:1px solid #e7e7eb;}@supports(-webkit-overflow-scrolling:touch){.rich_media_title{font-weight:700}}.rich_media_meta{display:inline-block;vertical-align:middle;padding:0 0 10px 0;font-size:15px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_meta.icon_appmsg_tag{margin-right:0px}.rich_media_meta.meta_tag_text{margin-right:0}.rich_media_meta_list em{font-style:normal}.rich_media_meta_text{color:#a5a5a5;}p{margin:0;}.msgBox{margin-top:20px;padding-top:20px;padding-left:50px;overflow:hidden;border-top:2px dashed #09a2ff;}.msg{padding-top:7px;clear:both;}.msgBody{float:right;width:100%;margin-left:55px;padding-bottom:15px;border-bottom:1px dashed #e0e0e0;}.userHeadImg{float:left;margin-left:-50px;}.userHeadImg img{width:40px;height:40px;margin-right:10px;border-radius:3px;}.userName{color:#888888;line-height:24px;font-size:14px;margin:5px 0 5px 0;height:24px;}.replyBody,.autherBody{color:#565656;font-size:15px;}.replyIcon{border-left:4px solid #33ab01;margin-right:5px;}.ad{text-decoration:none;color:#d6d4d4;font-size:12px;}.msgBodyReply{padding-top:5px;}.userName span{float:right;color:#afafaf;font-size:14px;}code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;}.code-snippet__fix{font-size:14px;margin:10px 0;display:block;color:#333;position:relative;background-color:rgba(0,0,0,0.03);border:1px solid #f0f0f0;border-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;padding-left:25px;line-height:26px}.code-snippet__fix code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;font-family:Consolas,\"Liberation Mono\",Menlo,Courier,monospace}.code-snippet__comment,.code-snippet__quote{color:#afafaf;font-style:italic}.code-snippet__keyword,.code-snippet__selector-tag,.code-snippet__subst{color:#ca7d37}.code-snippet__number,.code-snippet__literal,.code-snippet__variable,.code-snippet__template-variable,.code-snippet__tag .code-snippet__attr{color:#0e9ce5}.code-snippet__string,.code-snippet__doctag{color:#d14}.code-snippet__title,.code-snippet__section,.code-snippet__selector-id{color:#d14}.code-snippet__subst{font-weight:normal}.code-snippet__type,.code-snippet__class .code-snippet__title{color:#0e9ce5}.code-snippet__tag,.code-snippet__name,.code-snippet__attribute{color:#0e9ce5;font-weight:normal}.code-snippet__regexp,.code-snippet__link{color:#ca7d37}.code-snippet__symbol,.code-snippet__bullet{color:#d14}.code-snippet__built_in,.code-snippet__builtin-name{color:#ca7d37}.code-snippet__meta{color:#afafaf}.code-snippet__deletion{background:#fdd}.code-snippet__addition{background:#dfd}.code-snippet__emphasis{font-style:italic}.code-snippet__strong{font-weight:bold}.account_avatar{width:40px;height:40px;padding:0;}.account_info{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;padding:20px 0;align-items:center}.flex_bd{padding-left:14px;}.account_nickname{display:inline-block;vertical-align:middle;line-height:1.2;color:#576b95;font-size:14px}.account_desc{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:rgba(0,0,0,0.3);font-size:14px;line-height:1.2;padding-top:.4em}.msg_source_url{text-align:left;word-break:break-all;margin-top:20px;}.msg_source_url a{padding-right:10px;}.msg_source_url .url_text{color:#a8a8a8;}.video-desc{font-size:14px;margin-top:15px;color:#6c6c6c;}.msg_source_url{text-align:left;}.original_primary_card_tips{color:rgba(0,0,0,0.3);line-height:1.4;font-size:15px;}.weui-flex__item{margin-bottom:20px;padding:20px 16px;margin-top:16px;line-height:1.4;align-items:center;background-color:#f7f7f7;border-radius:8px;position:relative;}.original_primary_desc{color:rgba(0,0,0,0.5);font-size:14px;padding-top:4px;width:auto;overflow:hidden;text-overflow:ellipsis;}.msgBodyReplyList{border-top:1px solid #e1e1e1;margin-top:10px;}.msgBodyReplyListTop{border-top:0;}.reply_like_num{float:right;font-size:14px;color:#c7c7c7;}.msgData{margin-top:20px;color:#626262;}.msgData span{font-size:14px;padding-right:15px;}.msgData .likes{float:right;padding-right:0;}.js_text_content p{font-size:18px;}.rich_media_meta_link{font-size:15px;}blockquote {padding-left: 10px;border-left: 3px solid #dbdbdb;color: rgba(0,0,0,0.5);font-size: 15px;padding-top: 4px;margin: 1em 0;}.video_iframe{width:500px;height:400px;}.blockquote_info{color:#b5b5b5;margin-top:10px;}#copyright_logo{color:#bdbdbd;}.rich_media_meta_list{margin-bottom:10px;}.reprint{background:#efefef;border-radius:5px;padding:8px;color:#1f1f1f;}.reprint a{word-break:break-all;}.topic{color:#8e8e8e;background:#f7f7f7;border-radius:5px;padding:10px 8px;}.topic a{padding-right:5px;}.topic p{margin-bottom:5px;}\n<\/style>\n<link href=\"https:\/\/www.juyifx.cn\/config\/css\/wxArticle.css\" rel=\"stylesheet\"\/>\n<\/head><script>\nvar data={\"mp\":\"\u751f\u4fe1\u679c\",\"title\":\"tidyr\u5e26\u4f60\u641e\u5b9a\u957f\u5bbd\u683c\u5f0f\u8f6c\u6362\",\"time\":\"2023-08-22 19:00:12\",\"timeStamp\":\"1692702012\"};\n<\/script><br \/>\n<body><\/p>\n<div class=\"rich_media\">\n<h1 class=\"rich_media_title\" id=\"activity-name\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg3OTg3MjQyNg==&#038;mid=2247491567&#038;idx=2&#038;sn=e18ae4a8a02685f25690836855cbb8cb&#038;chksm=cf7c8f2af80b063cbb6e7ea42994e8388768b3a6b2a3a9f9a463dee0b657cd6a3ff9e1b7973b#rd\" target=\"_blank\" rel=\"noopener\">tidyr\u5e26\u4f60\u641e\u5b9a\u957f\u5bbd\u683c\u5f0f\u8f6c\u6362<\/a><\/h1>\n<div id=\"meta_content\" class=\"rich_media_meta_list\"><span class=\"rich_media_meta rich_media_meta_text\">\u5c0f\u5e08\u59b9&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_nickname\" id=\"profileBt\"><a href=\"javascript:void(0);\" class=\"wx_tap_link js_wx_tap_highlight weui-wa-hotarea\" id=\"js_name\">\u751f\u4fe1\u679c&nbsp;&nbsp;<\/a><\/span><em id=\"publish_time\" class=\"rich_media_meta rich_media_meta_text\">2023-08-22 19:00:12<\/em><\/div>\n<p><content><\/p>\n<div class=\"reprint\">\n<p>\u8f6c\u81ea\u516c\u4f17\u53f7\uff1aR\u8bed\u8a00\u5b66\u5f92<br \/><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg5MDk3Mzg4OA==&#038;mid=2247484985&#038;idx=1&#038;sn=af898e0055c9de115097052fe1b07227\" target=\"_blank\" title=\"\u9605\u8bfb\u539f\u6587\" rel=\"noopener\">http:\/\/mp.weixin.qq.com\/s?__biz=Mzg5MDk3Mzg4OA==&#038;mid=2247484985&#038;idx=1&#038;sn=af898e0055c9de115097052fe1b07227<\/a><\/p>\n<\/div>\n<section style=\"font-size: 16px;margin-bottom: 24px;\">\n<section style=\"display: flex;width: 100%;flex-flow: column nowrap;\" powered-by=\"xiumi.us\">\n<section style=\"z-index: 1;\" powered-by=\"xiumi.us\">\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;margin-top: 10px;margin-bottom: 10px;\">\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(340deg) scale(0.65);margin-top: -4px;margin-bottom: -4px;transform-origin: center center;\" powered-by=\"xiumi.us\">\n<section style=\"text-align: center;\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;height: auto;padding-right: 5px;padding-left: 2px;\">\n<section style=\"text-align: justify;color: rgb(239, 135, 135);font-size: 18px;\" powered-by=\"xiumi.us\">\n<p style=\"text-align: center;white-space: normal;\"><span style=\"font-size: 16px;\">\u70b9\u51fb\u84dd\u5b57\uff0c\u5173\u6ce8\u6211\u4eec<\/span><br  \/><\/p>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(20deg);\" powered-by=\"xiumi.us\">\n<section style=\"text-align: center;\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u5bf9\u4e8e\u6570\u636e\u8fdb\u884c\u5904\u7406\uff0c\u7b5b\u9009\u51fa\u60f3\u8981\u7684\u6570\u636e\uff0c\u5bf9\u4e8e\u751f\u7269\u4fe1\u606f\u7684\u5206\u6790\u6765\u8bf4\uff0c\u662f\u5f88\u91cd\u8981\u7684\u3002\u5c0f\u679c\u6700\u8fd1\u5904\u7406\u6570\u636e\u65f6\uff0c\u521a\u597d\u78b0\u5230\u957f\u683c\u5f0f\u548c\u5bbd\u683c\u5f0f\u7684\u8f6c\u6362\uff0c\u82e6\u607c\u4e4b\u9645\uff0c\u597d\u5728\u6070\u597d\u53d1\u73b0\u6709tidyr\u5305\u6b63\u597d\u5e2e\u6211\u89e3\u51b3\u4e86\u8fd9\u4e2a\u95ee\u9898\u3002\u90a3\u4e48\u73b0\u5728\u5c31\u8ba9\u6211\u6765\u5e26\u5927\u5bb6\u5165\u95e8tidyr\u5305\u7684\u57fa\u672c\u64cd\u4f5c\u5427\uff01<br  \/><\/p>\n<section style=\"text-align: center;justify-content: center;display: flex;flex-flow: row nowrap;margin-top: 10px;margin-bottom: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: auto;vertical-align: top;align-self: flex-start;flex: 0 0 auto;min-width: 5%;height: auto;background-color: rgb(255, 255, 255);overflow: hidden;padding-top: 5px;\">\n<section style=\"display: flex;width: 100%;flex-flow: column nowrap;\" powered-by=\"xiumi.us\">\n<section style=\"z-index: 1;\" powered-by=\"xiumi.us\">\n<section style=\"justify-content: center;display: flex;flex-flow: row nowrap;margin-bottom: 5px;\">\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(340deg) scale(0.65);margin-top: -4px;margin-bottom: -4px;transform-origin: center center;\" powered-by=\"xiumi.us\">\n<section style=\"\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;height: auto;padding-right: 5px;padding-left: 2px;\">\n<section style=\"text-align: justify;letter-spacing: 2px;color: rgb(239, 135, 135);font-size: 18px;\" powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\">\u4e00\u3001tidyr\u5305\u662f\u4ec0\u4e48\uff1f<br  \/><\/p>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(20deg);\" powered-by=\"xiumi.us\">\n<section style=\"\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;margin-top: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(242, 206, 206);padding-bottom: 5px;\">\n<section style=\"display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;margin-top: -7px;margin-bottom: -12px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -4px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -10px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-right: -10px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -10px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-right: -10px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;margin-right: -4px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">tidyr \u662f R \u8bed\u8a00\u4e2d\u4e00\u4e2a\u6570\u636e\u5904\u7406\u7684\u5305\uff0c\u5b83\u63d0\u4f9b\u4e86\u7528\u4e8e\u6574\u7406\u6570\u636e\uff08\u5373\u6570\u636e\u6e05\u6d17\u548c\u91cd\u5851\uff09\u7684\u51fd\u6570\uff0c\u7279\u522b\u662f\u5728\u6570\u636e\u89c4\u6574\u65b9\u9762\u975e\u5e38\u5f3a\u5927\u3002tidyr \u4e2d\u7684\u4e3b\u8981\u51fd\u6570\u5305\u62ec gather() \u548c spread() \u7528\u4e8e\u6570\u636e&#8221;\u957f&#8221;\u5bbd\u8868\u7684\u8f6c\u6362; separate() \u548c unite() \u7528\u4e8e\u5c06\u4e00\u5217\u6570\u636e\u62c6\u4e3a\u591a\u5217\u6216\u8005\u5c06\u591a\u5217\u5408\u5e76\u4e3a\u4e00\u5217\u3002tidyr \u7684\u51fd\u6570\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u6570\u636e\u6574\u7406\u6210\u9002\u5408\u8fdb\u884c\u540e\u7eed\u5206\u6790\u7684\u957f\u683c\u5f0f\u6216\u8005\u5bbd\u683c\u5f0f\u3002\u5728\u751f\u7269\u4fe1\u606f\u5b66\u4e2d\uff0c\u6211\u4eec\u5e38\u5e38\u9700\u8981\u5c06\u6570\u636e\u4ece\u5bbd\u683c\u5f0f\u8f6c\u6362\u6210\u957f\u683c\u5f0f\u8fdb\u884c\u5206\u6790\uff0c\u6216\u8005\u53cd\u8fc7\u6765\u8fdb\u884c\u5c55\u793a\u6570\u636e\u3002<\/p>\n<section style=\"text-align: center;justify-content: center;display: flex;flex-flow: row nowrap;margin-top: 10px;margin-bottom: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: auto;vertical-align: top;align-self: flex-start;flex: 0 0 auto;min-width: 5%;height: auto;background-color: rgb(255, 255, 255);overflow: hidden;padding-top: 5px;\">\n<section style=\"display: flex;width: 100%;flex-flow: column nowrap;\" powered-by=\"xiumi.us\">\n<section style=\"z-index: 1;\" powered-by=\"xiumi.us\">\n<section style=\"justify-content: center;display: flex;flex-flow: row nowrap;margin-bottom: 5px;\">\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(340deg) scale(0.65);margin-top: -4px;margin-bottom: -4px;transform-origin: center center;\" powered-by=\"xiumi.us\">\n<section style=\"\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;height: auto;padding-right: 5px;padding-left: 2px;\">\n<section style=\"text-align: justify;letter-spacing: 2px;color: rgb(239, 135, 135);font-size: 18px;\" powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\">\u4e8c\u3001tidyr\u5305\u4e2d\u7684\u57fa\u672c\u64cd\u4f5c<\/p>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;\">\n<section style=\"transform: rotateZ(20deg);\" powered-by=\"xiumi.us\">\n<section style=\"\">\n<section style=\"display: inline-block;width: 20px;height: 20px;vertical-align: top;overflow: hidden;border-width: 1px;border-radius: 100%;border-style: solid;border-color: rgb(239, 135, 135);background-color: rgb(242, 203, 206);\">\n<section style=\"margin-top: 2px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 15px;height: 15px;vertical-align: top;overflow: hidden;border-width: 3px;border-radius: 100%;border-style: solid;border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 203, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;margin-top: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(242, 206, 206);padding-bottom: 5px;\">\n<section style=\"display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;margin-top: -7px;margin-bottom: -12px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -4px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -10px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-right: -10px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-left: -10px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;align-self: flex-start;border-width: 0px;margin-top: -16px;margin-right: -10px;margin-left: -10px;z-index: 1;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgb(239, 135, 135);background-color: rgba(255, 255, 255, 0);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;height: auto;margin-right: -4px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 33px;height: 25px;vertical-align: top;overflow: hidden;border-style: solid;border-width: 2px;border-radius: 50%;border-color: rgb(239, 135, 135) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);background-color: rgb(241, 206, 206);\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"color: rgb(239, 135, 135);\"><strong>1. &nbsp;\u5bfc\u5165\u6570\u636e\u548c\u52a0\u8f7dtidyr\u5305<\/strong><\/span><\/p>\n<p style=\"white-space: normal;\">\u9996\u5148\u6211\u4eec\u5148\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u4e86 4 \u4e2a\u57fa\u56e0\u7684\u8868\u8fbe\u6216\u8ba1\u6570\u6570\u636e\u7684\u6570\u636e\u6846\uff0c\u5176\u4e2d\u6bcf\u4e2a\u57fa\u56e0\u6709\u4e09\u4e2a\u6837\u672c\u7684\u6570\u636e\u3002\u5176\u4e2dgeneid \u662f\u6570\u636e\u6846\u4e2d\u7684\u4e00\u5217\uff0c\u5305\u542b\u4e86\u56db\u4e2a\u57fa\u56e0\u7684\u540d\u79f0\uff0c\u53ef\u4ee5\u770b\u5230\u8fd9\u4e9b\u57fa\u56e0\u5206\u522b\u88ab\u547d\u540d\u4e3a gene1\u3001gene2\u3001gene3\u3001gene4\u3002\u800csample1\u3001sample2\u3001sample3 \u662f\u6570\u636e\u6846\u4e2d\u7684\u53e6\u5916\u4e09\u5217\uff0c\u5206\u522b\u5305\u542b\u4e86\u8fd9\u56db\u4e2a\u57fa\u56e0\u5728\u4e0d\u540c\u60c5\u51b5\u4e0b\u7684\u8868\u8fbe\u6216\u8ba1\u6570\u6570\u636e\u3002<\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">#\u5bfc\u5165tidyr\u5305library(tidyr)#data.frame() \u51fd\u6570\u521b\u5efa\u4e86\u4e00\u4e2a\u6570\u636e\u6846test &lt;- data.frame(geneid = paste0(\"gene\",1:4), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sample1 = c(1,3,9,10), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sample2 = c(2,6,2.7,15), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sample3 = c(0.2,4,6,14))<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u4ee5\u4e0b\u4e3a\u6211\u4eec\u521b\u5efa\u7684\u57fa\u56e0\u6570\u636e\u6846\u7684\u5c55\u793a\uff1a<br  \/><\/p>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.27335640138408307\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/1_dicZh0QoJ8KHGVHKdpcMQeByIqNCVw.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRH4IHKu3WwDMTs8nXPHlGyOCBvdicZh0QoJ8KHGVHKdpcMQeByIqNCVw\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"289\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"color: rgb(239, 135, 135);\"><strong>2. gather()\u548cspread()\u51fd\u6570<\/strong><\/span><\/p>\n<p style=\"white-space: normal;\">\u5728\u6570\u636e\u5206\u6790\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u8fdb\u884c\u6570\u636e\u683c\u5f0f\u7684\u8f6c\u6362\uff0cgather() \u548c spread() \u51fd\u6570\u63d0\u4f9b\u4e86\u5feb\u901f\u3001\u65b9\u4fbf\u7684\u6570\u636e\u683c\u5f0f\u8f6c\u6362\u529f\u80fd\uff0c\u4f7f\u6570\u636e\u7684\u6574\u7406\u548c\u5206\u6790\u53d8\u5f97\u66f4\u52a0\u9ad8\u6548\u3002gather() \u51fd\u6570\u7528\u4e8e\u5c06\u5bbd\u6570\u636e\u683c\u5f0f\uff08wide format\uff09\u8f6c\u6362\u4e3a\u957f\u6570\u636e\u683c\u5f0f\uff08long format\uff09\uff0c\u5373\u628a\u6570\u636e\u4ece\u5bbd\u8868\u683c\u4e2d\u8f6c\u6362\u6210\u957f\u8868\u683c\u4e2d\u3002\u5b83\u5c06\u539f\u6570\u636e\u6846\u4e2d\u7684\u591a\u5217\u53d8\u6210\u4e00\u5217\uff0c\u5e76\u63d0\u53d6\u51fa\u53d8\u91cf\u6240\u5bf9\u5e94\u7684\u503c\u3002\u4e0b\u9762\u6765\u770b\u770b\u5e94\u7528\u5427\uff01<\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\">test_gather &lt;- gather(data = test, <span class=\"code-snippet__comment\">#\u6307\u5b9a\u6570\u636e &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;key = sample_nm, #\u5c06\u5408\u5e76\u540e\u7684\u5217\u53d6\u4e00\u4e2a\u5217\u540d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;value = exp, #\u5408\u5e76\u540e\u7684\u5217\u6240\u5305\u542b\u7684\u6570\u503c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- geneid) #- geneid\u8868\u793a\u5c06geneid\u5217\u4fdd\u7559\u4e0d\u5408\u5e76<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8f6c\u6362\u4e4b\u540e\u7684\u7ed3\u679c\u4e3a<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5308056872037915\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/2_Z8GfOVI13Xicf2qTk0u6fwyqGeqJYQ.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRonmPWVFFm0CslBRHLxqdTza4nZ8GfOVI13Xicf2qTk0u6fwyqGeqJYQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"211\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u800cspread() \u51fd\u6570\u4e0e gather() \u51fd\u6570\u76f8\u53cd\uff0c\u5b83\u5c06\u957f\u6570\u636e\u683c\u5f0f\u8f6c\u6362\u4e3a\u5bbd\u6570\u636e\u683c\u5f0f\u3002<\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\">test_re &lt;- spread(data = test_gather, <span class=\"code-snippet__comment\">#\u6307\u5b9a\u6570\u636e key = sample_nm, #\u5c06\u5408\u5e76\u540e\u7684\u5217\u53d6\u4e00\u4e2a\u5217\u540d value = exp) #\u5408\u5e76\u540e\u7684\u5217\u6240\u5305\u542b\u7684\u6570\u503c<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u8f6c\u6362\u4e4b\u540e\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u7684\u6570\u636e\u4e3a\uff1a<br  \/><\/p>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.26501766784452296\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/3_H0OD7SlIgKAhSVACLwzy4j7D5k9HDg.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRqhwuPzMraVpibH3SSkIu8MtOIH0OD7SlIgKAhSVACLwzy4j7D5k9HDg\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"283\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"color: rgb(239, 135, 135);\"><strong>3. separate()\u548cunite()\u51fd\u6570<\/strong><\/span><\/p>\n<p style=\"white-space: normal;\">\u5728\u6570\u636e\u6e05\u6d17\u3001\u6574\u5408\u7684\u8fc7\u7a0b\u4e2d\uff0cseparate() \u548c unite() \u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5feb\u901f\u5b9e\u73b0\u6570\u636e\u62c6\u5206\u548c\u5408\u5e76\uff0c\u5c24\u5176\u5728\u5904\u7406\u6587\u672c\u6570\u636e\u65f6\u975e\u5e38\u5b9e\u7528\u3002separate() \u51fd\u6570\u7528\u4e8e\u5c06\u6570\u636e\u6846\u4e2d\u7684\u4e00\u5217\u62c6\u5206\u6210\u591a\u5217\uff0c\u5c06\u67d0\u4e00\u5217\u7684\u6570\u636e\u6309\u7167\u6307\u5b9a\u7684\u5206\u9694\u7b26\u5206\u9694\u4e3a\u65b0\u7684\u5217\uff0c\u4e14\u6bcf\u4e2a\u65b0\u5217\u7684\u547d\u540d\u548c\u4f4d\u7f6e\u53ef\u4ee5\u6307\u5b9a\u3002\u4e0b\u9762\u6765\u770b\u770b\u4e3e\u4f8b\u5427\uff01<\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\">test &lt;- data.frame(x = <span class=\"code-snippet__built_in\">c<\/span>( <span class=\"code-snippet__string\">\"a,b\"<\/span>, <span class=\"code-snippet__string\">\"a,d\"<\/span>, <span class=\"code-snippet__string\">\"b,c\"<\/span>)) <span class=\"code-snippet__comment\">#\u751f\u6210\u52a0\u8f7d\u6570\u636etesttest_seprate &lt;- separate(test, #\u5f85\u5904\u7406\u7684\u6570\u636e\u6846 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x, #\u5f85\u5206\u5272\u7684\u5217\uff0c\u8fd9\u91cc\u662f\u5df2\u7ecf\u5b58\u5728\u7684\u5217\uff0c\u4e0d\u52a0\u5f15\u53f7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c(\"X\", \"Y\"), #\u5206\u5272\u540e\u7684\u5217\u540d\uff0c\u6ce8\u610f\u52a0\u5f15\u53f7\uff0c\u662f\u5b57\u7b26 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sep = \",\") #\u6307\u5b9a\u5206\u5272\u7b26test_seprate<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u6211\u4eec\u53ef\u4ee5\u9996\u5148\u52a0\u8f7dtest \u7684\u6570\u636e\u6846\uff0c\u8be5\u6570\u636e\u6846\u5305\u542b\u4e86\u4e00\u5217 x\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u4e09\u4e2a\u5b57\u7b26\u4e32\u503c <span class=\"code-snippet__string\">\"a,b\"<\/span>\u3001<span class=\"code-snippet__string\">\"a,d\"<\/span> \u548c <span class=\"code-snippet__string\">\"b,c\"<\/span>\u3002\u6240\u5f97\u7ed3\u679c\u5982\u4e0b\uff1a<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.8651685393258427\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/4_rFINUdDhmNsVkOia6AXlic8hCcZaOw.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRSyk6TShMzPu0x2xqm1Pvy4HM4yrFINUdDhmNsVkOia6AXlic8hCcZaOw\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"89\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\">test_separate \u662f\u4e00\u4e2a\u65b0\u7684\u6570\u636e\u6846\uff0c\u7531\u539f\u6765\u7684 test \u6570\u636e\u6846\u4f7f\u7528 separate() \u51fd\u6570\u64cd\u4f5c\u751f\u6210\u7684\u3002separate() \u51fd\u6570\u5c06\u539f\u6570\u636e\u6846\u4e2d\u7684 x \u5217\u6309\u7167\u9017\u53f7 , \u8fdb\u884c\u62c6\u5206\uff0c\u751f\u6210\u4e86\u4e24\u5217\u65b0\u7684\u6570\u636e\u3002\u6240\u5f97\u7ed3\u679c\u5982\u4e0b\uff1a<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5302013422818792\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/5_c4Q698NaicqBO34IOByKfTu8zOFs0A.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRaKBztKIXN4jEOtccqPzs15GZwic4Q698NaicqBO34IOByKfTu8zOFs0A\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"149\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u7d27\u63a5\u7740\uff0c\u6211\u4eec\u6765\u770b\u770bunite()\u51fd\u6570\u7684\u4f7f\u7528\u5427\uff01unite() \u51fd\u6570\u662f tidyr \u5305\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u591a\u5217\u6570\u636e\u5408\u5e76\u6210\u4e00\u5217\uff0c\u5e76\u7528\u6307\u5b9a\u7684\u5206\u9694\u7b26\u8fdb\u884c\u5206\u9694\u3002\u5e38\u7528\u4e8e\u5c06\u8868\u683c\u4e2d\u7684\u591a\u4e2a\u5217\u8fdb\u884c\u7ec4\u5408\u3002\u4e3e\u4e2a\u4f8b\u5b50\u6765\u770b\u770b\u5427\uff01<\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"r\"><code><span class=\"code-snippet_outer\">test_re &lt;- unite(test_seprate, <span class=\"code-snippet__comment\">#\u5f85\u5904\u7406\u7684\u6570\u636e\u6846 \"x\", #\u5408\u5e76\u540e\u7684\u5217\u7684\u5217\u540d\uff0c\u73b0\u5728\u4e0d\u5b58\u5728\u7684\uff0c\u6ce8\u610f\u52a0\u5f15\u53f7 X,Y, #\u5f85\u5408\u5e76\u7684\u5217\uff0c\u4e0d\u52a0\u5f15\u53f7 sep = \",\") #\u6307\u5b9a\u5408\u5e76\u540e\u7684\u8fde\u63a5\u7b26 test_re<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u4f7f\u7528 unite() \u51fd\u6570\u5c06\u6570\u636e\u6846 test_separate \u4e2d\u7684 X \u5217\u548c Y \u5217\u5408\u5e76\u6210\u4e00\u5217\uff0c\u65b0\u5217\u7684\u540d\u79f0\u4e3a x\uff0c\u5408\u5e76\u540e\u7684\u8fde\u63a5\u7b26\u4e3a ,\u3002\u4ee5\u4e0a\u4ee3\u7801\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.8105263157894737\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/6_chgoeXMyNohnWwcfWNhjk1ljEp7AWw.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXiaGH8whEl2XhibbZSauHrVRNPZBibn8j4MfLhNLvNwNDlOsHchgoeXMyNohnWwcfWNhjk1ljEp7AWw\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"95\" style=\"vertical-align: middle;width: 100%;\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\u901a\u8fc7\u5b66\u4e60\uff0c\u76f8\u4fe1\u5927\u5bb6\u5bf9tidyr\u5305\u6709\u4e86\u66f4\u4e3a\u6df1\u5165\u7684\u4e86\u89e3\u4e86\u5427\uff01\u90a3\u4e48\u63a5\u4e0b\u6765\uff0c\u81ea\u5df1\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0a\u7684\u4ee3\u7801\u53bb\u953b\u70bc\u953b\u70bc\uff0c\u76f8\u4fe1\u7ed3\u5408\u4e86\u5c0f\u679c\u7684\u8bb2\u89e3\uff0c\u4e5f\u4f1a\u7406\u89e3\u5f97\u66f4\u597d\uff01\u5982\u679c\u5927\u5bb6\u5bf9R\u5305\u7b49\u611f\u5174\u8da3\u7684\u8bdd\uff0c\u8fd8\u53ef\u4ee5\u767b\u5f55http:\/\/www.biocloudservice.com\/home.html\u8fdb\u884c\u5b66\u4e60\uff01<\/p>\n<section style=\"margin: 10px 0%;text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: middle;width: 40%;padding-right: 10px;align-self: center;flex: 0 0 auto;\">\n<section style=\"font-size: 6px;margin-right: 0%;margin-left: 0%;text-align: right;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;border-width: 1px;border-style: solid;border-color: rgba(255, 255, 255, 0);background-color: rgb(232, 250, 150);text-align: center;width: 1.8em;height: 1.8em;line-height: 1.8em;border-radius: 100%;margin-left: auto;margin-right: auto;color: transparent;\">\n<p>1<\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: middle;width: 20%;align-self: center;flex: 0 0 auto;\">\n<section style=\"margin-right: 0%;margin-left: 0%;text-align: center;font-size: 21px;\" powered-by=\"xiumi.us\">\n<section style=\"background-color: rgb(239, 135, 135);display: inline-block;width: 2.5em;height: 2.5em;line-height: 2.5em;border-radius: 100%;margin-left: auto;margin-right: auto;color: rgb(255, 255, 240);\">\n<p><strong>END<\/strong><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: middle;width: 40%;padding-left: 10px;align-self: center;flex: 0 0 auto;\">\n<section style=\"font-size: 6px;margin-right: 0%;margin-left: 0%;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;border-width: 1px;border-style: solid;border-color: rgba(255, 255, 255, 0);background-color: rgb(232, 250, 150);text-align: center;width: 1.8em;height: 1.8em;line-height: 1.8em;border-radius: 100%;margin-left: auto;margin-right: auto;color: transparent;\">\n<p>1<\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"margin-bottom: 24px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.3488888888888889\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/7_BoDuficWb7YjnP0CXo0mIcibhsXn8w.jpg?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_jpg\/oCSOtP61aEUlxqHhbZryhECGXicgBrLn1ZkgkpYia2qsgSgNWPQMp0RiaIAmlBoDuficWb7YjnP0CXo0mIcibhsXn8w\/640?wx_fmt=jpeg'\" data-type=\"jpeg\" data-w=\"900\" style=\"\"  data-recalc-dims=\"1\" \/><\/p>\n<p style=\"margin-bottom: 24px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5555555555555556\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/8_akXKU5NcO1KwuWc1Rk7ZJ56LC2pYrQ-2.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/oCSOtP61aEXjjmsEC5aXz0RE4be2ib1fJPnBD8yX0Z6OF2zocd2ngHpLOakXKU5NcO1KwuWc1Rk7ZJ56LC2pYrQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"900\" style=\"\"  data-recalc-dims=\"1\" \/><\/p>\n<p style=\"display: none;margin-bottom: 24px;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<p><\/content><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>tidyr\u5e26\u4f60\u641e\u5b9a\u957f\u5bbd\u683c\u5f0f\u8f6c\u6362 \u5c0f\u5e08\u59b9&nbsp;&nbsp;\u751f\u4fe1\u679c&nbsp;&nbsp;2023-08-2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/56052"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56052"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/56052\/revisions"}],"predecessor-version":[{"id":56061,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/56052\/revisions\/56061"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56052"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}