【发布时间】:2011-04-08 05:41:00
【问题描述】:
我习惯了 perl 和 R 新手。我知道您可以使用 read.table() 读取整个表,但我想知道如何使用 R 解析输入文件中的单行。
具体来说,相当于下面的perl sn -p:
open my $fh, $filename or die 'can't open file $filename';
my $line = <$fh>;
my ($first, $second, $third) = split ("\t", $line);
【问题讨论】: