Get the App
SLTechnology News&Howtos  ›  Development  › 

R how to merge table files horizontally according to the common ID

Shulou Source: shulou.com Published: 2022-06-01 04:49:04 09月22日 Update

This article "r language how to merge table files horizontally according to the common ID" is not understood by most people, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "r language how to merge table files horizontally according to the common ID" article.

Merge_tsv_files.r merges table files horizontally according to the common ID

How to use it:

$Rscript $scriptdir/merge_tsv_files.r-husage: / work/STAD_immu_demo1/scripts/merge_tsv_files.r [- h]-I input [input...] [- b by [by...]] [- t type] [- p prefix] [- o outdir] merge tsv files by rownamesoptional arguments:-h -- help show this help message and exit-I input [input...],-- input input [input...] Input gct format file [required]-b by [by...],-- by by [by...] Character vector of variable names to join by. If omitted,will match on all common variables. -t type,-- type of join: left (default), right, inner or full-p prefix,-- prefix prefix output file name prefix [default demo]-o outdir,-- outdir outdir output file directory [default cwd]

Instructions for use:

-I specify the path where multiple table files are located

-- by the two tables share the same column name as ID:

-- type merge type. Left is based on the ID of the leftmost key column of the table. ID that does not exist will be removed. Inner takes intersection.

Examples of use:

Rscript $scriptdir/merge_tsv_files.r-I $workdir/metadata.tsv hclust/hclusters.tsv\ immu/estimate_score.tsv-p metadata.group-- by barcode above is about the content of this article about "how r language merges form files horizontally according to common ID". I believe you all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Tags: Tables documents content horizontal language location articles knowledge articles two intersection value usage instructions keys multiple most that is methods more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Linux Shulou Information macOS