由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - ask for help for R programming (转载)
相关主题
[转载] Anybody tried sorting algorithm from NR?[转载] Re: Help needed on generating sample datasets
how to set cutoff for sorting within unix system在vista上用matlab?
C++ object-oriented for CFD大牛:到哪里去下载RFID数据集?
对矩阵求导[C++]string array?
matlab 能不能解符号矩阵方程? (转载)RGB-Depth Human Activity Video Dataset
A book on optimization over complex domainWrite In C
karmarkar's paperMPI Write?
并行的fft大家用什么library?关于文件输出,请教大家?
相关话题的讨论汇总
话题: ab话题: 517话题: bb话题: chr话题: aa
进入Computation版参与讨论
1 (共1页)
w*****1
发帖数: 473
1
【 以下文字转载自 Statistics 讨论区 】
发信人: wz99331 (dotti), 信区: Statistics
标 题: ask for help for R programming
发信站: BBS 未名空间站 (Thu Oct 16 15:25:16 2014, 美东)
I need to transpose a file to example.txt
the final dataset should be sorted by chr first then by position. Could
anyone help me to write the R code? Thank you very much!
raw data:
snp Chr pos Sample.ID Allele1 Allele2
rs6269442 1 1.614 517 A B
rs13475701 1 1.744 517 A B
rs13475706 1 1.889 517 A B
rs3684358 1 2.06 517 A B
rs13475729 1 3.749 517 A B
rs3671256 1 5.009 517 A B
rs13475750 1 6.153 517 A B
rs6404446 1 6.442 517 A B
rs31949292 1 8.486 517 A B
rs6173215 1 8.692 517 A B
rs31917015 1 10.425 517 A B
rs6166266 1 10.731 517 A B
rs3677683 1 10.932 517 A B
rs3695988 1 11.345 517 A B
rs4137502 1 11.461 517 A B
.
.
.
example.txt
snp chr pos sampel.id1 sample.id2 .........
rs6269442 1 1.614 AB AB
rs13475701 1 1.744 AA AB
rs13475706 1 1.889 AA AB
rs3684358 1 2.06 AB BB
rs13475729 1 3.749 AB BB
rs3671256 1 5.009 AB BB
rs13475750 1 6.153 AB AB
rs6404446 1 6.442 AB AB
rs31949292 1 8.486 AB AB
rs6173215 1 8.692 AB AB
rs31917015 1 10.425 AB AB
rs6166266 1 10.731 AB AB
rs3677683 1 10.932 AB AB
rs3695988 1 11.345 AB AB
rs4137502 1 11.461 AB AB
.
.
.
1 (共1页)
进入Computation版参与讨论
相关主题
关于文件输出,请教大家?matlab 能不能解符号矩阵方程? (转载)
How to read data written my MPI_WRITE?A book on optimization over complex domain
MATLAB 一问karmarkar's paper
在matlab里怎么找到一个数组里的最大k个元素并行的fft大家用什么library?
[转载] Anybody tried sorting algorithm from NR?[转载] Re: Help needed on generating sample datasets
how to set cutoff for sorting within unix system在vista上用matlab?
C++ object-oriented for CFD大牛:到哪里去下载RFID数据集?
对矩阵求导[C++]string array?
相关话题的讨论汇总
话题: ab话题: 517话题: bb话题: chr话题: aa