我有一個數據框,我想刪除所有以#
開頭的行。任何人都可以告訴我如何去做。提前致謝。如何刪除以R中的特殊字符開頭的行
#ID_REF = The name of the probe set, blank for control probes
#VALUE = The signal value calculated by MAS5, normalized
#ABS_CALL = The detection value calculated by the MAS5
#DETECTION P-VALUE = The detection p-value calculated by the MAS5
*ID_REF** VALUE** ABS_CALL** DETECTION P-VALUE*
AFFX-BioB-5_at 757.7 P 0.00039
AFFX-BioB-M_at 933.7 P 0.000095
AFFX-BioB-3_at 525.6 P 0.000095
AFFX-BioC-5_at 1999.5 P 0.000044
AFFX-BioC-3_at 2339.5 P 0.000044
AFFX-BioDn-5_at 4321.3 P 0.000044
AFFX-BioDn-3_at 9229.4 P 0.00007
AFFX-CreX-5_at 21949.9 P 0.000044
AFFX-CreX-3_at 26022.8 P 0.000044
AFFX-DapX-5_at 1171.1 P 0.00006
嘗試'read.delim( 'yourfile',comment.char = '#')' – akrun 2015-02-10 16:33:00
http://stackoverflow.com/questions/28433328/skip-comment-line-in-csv的可能的複製-file-using-r – akrun 2015-02-10 16:36:07
@akrun,它使用'#'刪除一些行,但合併一行中的所有數據 – AwaitedOne 2015-02-10 16:38:37