In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the use of the R language parameter check.names". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
R language adds check.names=F parameters to read data such as read.table to ensure that special characters of the data can be read properly:
For example, the data header "-" is considered to be "."
> A=read.table ("F:/test/WGCNA/data/fpkm/All.DEG_final_3000.xls", sep= "\ t", check.names=T,header=T) > head (A 2) ID CK.WT.1 CK.WT.2 CK.WT.3 CK.tdr1.1 CK.tdr1.2 CK.tdr1.3 NaWT.1 NaWT.2 NaWT.31 AT1G01010 3.74149 7.3618 5.81734 5.71131 7.97054 10.37620 6.29949 5.55062 5.847792 AT1G01030 5.23528 2.66859 3.22632 1.32105 1.96726 2.40259 3.23077 4.80378 Natdr1.1 Natdr1.2 Natdr1.3 Na.WT. 1 Na.WT.2 Na.WT.3 Na.tdr1.1 Na.tdr1.2 Na.tdr1.31 15.58810 14.76360 17.74670 9.84943 7.97949 6.841060 13.29120 25.37000 19.599402 2.04301 2.29524 1.95286 1.83377 1.70757 0.809564 3.23172 1.80478 2.06044 SWT.1 SWT.2 SWT.3 Stdr1.1 Stdr1.2 Stdr1.31 4.96687 5.53349 3.18816 6.93650 7.88402 11 .250402 8.49256 2.65564 2.25570 4.35298 4.52147 7.11351 > A=read.table ("F:/test/WGCNA/data/fpkm/All.DEG_final_3000.xls" Sep= "\ t", check.names=F,header=T) > head (A 2) ID CK-WT-1 CK-WT-2 CK-WT-3 CK-tdr1-1 CK-tdr1-2 CK-tdr1-3 NaWT-1 NaWT-2 NaWT-31 AT1G01010 3.74149 7.3618 5.81734 5.71131 7.97054 10.37620 6.29949 5.55062 5.847792 AT1G01030 5.23528 2.66859 3.22632 1.32105 1.96726 2.40259 3.23077 4.80378 Natdr1-1 Natdr1-2 Natdr1-3 Na-WT- 1 Na-WT-2 Na-WT-3 Na-tdr1-1 Na-tdr1-2 Na-tdr1-31 14.76360 17.74670 9.84943 7.97949 6.841060 13.29120 25.37000 19.599402 2.04301 2.29524 1.95286 1.83377 1.70757 0.809564 3.23172 1.80478 2.06044 SWT-1 SWT-2 SWT-3 Stdr1-1 Stdr1-2 Stdr1-31 4.96687 5.53349 3.18816 6.93650 7.88402 11 . 250402 8.49256 2.65564 2.25570 4.35298 4.52147 7.11351
The data.frame () function also has character changes when combining data boxes, so you need to set check.names=F.
Data box:
> A1roomA [ 1:12] > head (A1 CK-tdr1 2) ID CK-WT-1 CK-WT-2 CK-WT-3 CK-tdr1-1 CK-tdr1-2 CK-tdr1-3 NaWT-1 NaWT-2 NaWT-31 AT1G01010 3.74149 7.3618 5.81734 5.71131 7.97054 10.37620 6.29949 5.55062 5.847792 AT1G01030 5.23528 2.66859 3.22632 1.32105 1.96726 2.40259 3.23077 4.80378 Natdr1-1 Natdr1-21 15.58810 14.763602 2.04301 2.29524 > A2roomA [ 13:24] > head Natdr1-3 Na-WT-1 Na-WT-2 Na-WT-3 Na-tdr1-1 Na-tdr1-2 Na-tdr1-3 SWT-1 SWT-2 SWT-31 17.74670 9.84943 7.97949 6.841060 13.29120 25.37000 19.59940 4.96687 5.53349 3.188162 1.95286 1.83377 1.70757 0.809564 3.23172 1.80478 2.06044 8.49256 2.65564 2.25570 Stdr1- 1 Stdr1-21 6.93650 7.884022 4.35298 4.52147
Combination:
> B=data.frame (A1 Magi A2) > head (B) 2) ID CK.WT.1 CK.WT.2 CK.WT.3 CK.tdr1.1 CK.tdr1.2 CK.tdr1.3 NaWT.1 NaWT.2 NaWT.31 AT1G01010 3.74149 7.3618 5.81734 5.71131 7.97054 10.37620 6.29949 5.55062 5.847792 AT1G01030 5.23528 2.66859 3.22632 1.32105 1.96726 2.40259 3.23077 4.80378 Natdr1.1 Natdr1.2 Natdr1.3 Na.WT. 1 Na.WT.2 Na.WT.3 Na.tdr1.1 Na.tdr1.2 Na.tdr1.31 15.58810 14.76360 17.74670 9.84943 7.97949 6.841060 13.29120 25.37000 19.599402 2.04301 2.29524 1.95286 1.83377 1.70757 0.809564 3.23172 1.80478 2.06044 SWT.1 SWT.2 SWT.3 Stdr1.1 Stdr1.21 4.96687 5.53349 3.18816 6.93650 7.884022 8.49256 2 .65564 2.25570 4.35298 4.52147 > B=data.frame (A1 A2check.namespace F) > head (B) 2) ID CK-WT-1 CK-WT-2 CK-WT-3 CK-tdr1-1 CK-tdr1-2 CK-tdr1-3 NaWT-1 NaWT-2 NaWT-31 AT1G01010 3.74149 7.3618 5.81734 5.71131 7.97054 10.37620 6.29949 5.55062 5.847792 AT1G01030 5.23528 2.66859 3.22632 1.32105 1.96726 2.40259 3.23077 4.80378 Natdr1-1 Natdr1-2 Natdr1-3 Na-WT- 1 Na-WT-2 Na-WT-3 Na-tdr1-1 Na-tdr1-2 Na-tdr1-31 15.58810 17.74670 9.84943 7.97949 6.841060 13.29120 25.37000 19.599402 2.04301 2.29524 1.95286 1.83377 1.70757 0.809564 3.23172 1.80478 2.06044 SWT-1 SWT-2 SWT-3 Stdr1-1 Stdr1-21 4.96687 5.53349 3.18816 6.93650 7.884022 8.49256 2 65564 2.25570 4.35298 4.52147 "what is the use of the parameter check.names of R language" here? Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.