我有一个2列和100万行的文件!我只想在没有任何排序的情况下绘制它们,因为我订购了数据.如何在没有任何树形图和重新排序的情况下使用heatmap.2制作热图?
我用的时候
heatmap.2(x, dendrogram="none")
Error: cannot allocate vector of size 4660.6 Gb
Run Code Online (Sandbox Code Playgroud)
但
我没试过 "Rowv"
heatmap.2(x, Rowv=FALSE)
Warning message:
In heatmap.2(x, Rowv = FALSE) :
Discrepancy: Rowv is FALSE, while dendrogram is `column'. Omitting row dendogram.
Run Code Online (Sandbox Code Playgroud) 使用以下代码,xlab将是粗体但是ylab不是.请你帮助我好吗
pdf()
par(font.axis=2, font.lab=2, cex.lab=1.2, cex.axis=1.2, cex.sub=1.2,
mfrow=c(2,2), mar = c(5,6,3,1) + 0.1)
hist(ADAM, axes=F, main="", ylim=c(0,1000000), xlab="",
ylab= expression(paste("number(",x10^6,")",sep="")))
axis(1,at=seq(0,1,0.2), labels=seq(0,1,0.2))
axis(2, at=seq(0,1000000,500000), labels=seq(0,1, by=0.5), las=2)
dev.off()
Run Code Online (Sandbox Code Playgroud)
谢谢
我有大约100张图片(png).我不想手动执行此操作,而是希望按照定义的顺序(基于文件名)将它们放在一个单独的pdf中(每行12个图像).
有人有什么建议吗?
我试着按照托马斯在下面告诉我的内容,将它们贴在黑色边缘旁边,我该如何删除?
setwd(workingDir);
files <- list.files(path=".", pattern="*.png", all.files=T, full.names=T)
filelist <- lapply(files, readPNG)
names(filelist) <- paste0(basename((files)))
list2env(filelist, envir=.GlobalEnv)
par(mar=rep(0,4))
layout(matrix(1:length(names(filelist)), ncol=15, byrow=TRUE))
for(i in 1:length(names(filelist))) {
img <- readPNG(names(filelist[i]))
plot(NA,xlim=0:1,ylim=0:1,xaxt="n",yaxt="n")
rasterImage(img,0,0,1,1)
}
dev.print(pdf, "output.pdf")
Run Code Online (Sandbox Code Playgroud) 我试图只打印奇数列,但我不能!
awk '{for (i=1; i<=NF; i++) print $2*i-1}' file > test
Run Code Online (Sandbox Code Playgroud)
但它在一列中打印所有内容!
你能帮帮我吗?
谢谢
你能帮我解决一下如何将每个4-sequantial行转换成一个以制表符分隔的列?
兑换:
A
1
2
3
3
3
4
1
Run Code Online (Sandbox Code Playgroud)
至 :
A 1 2 3
3 3 4 1
Run Code Online (Sandbox Code Playgroud) 我有 2 个 *.gz 文件。我想对它们进行cat(zcat)并将它们通过管道传输到命令作为其输入。
zcat file1.gz
zcat file2.gz
Run Code Online (Sandbox Code Playgroud)
然后按顺序通过管道将它们作为输入
| script file1 file2 >
Run Code Online (Sandbox Code Playgroud) 我有一个简单的问题:
#! /usr/bin/perl
use warnings;
use strict;
my $protfile = "file.txt";
open (FH, $protfile);
while (<FH>) {
print (<FH>);
}
Run Code Online (Sandbox Code Playgroud)
#! /usr/bin/perl
use warnings;
use strict;
my $protfile = "file.txt";
open (FH, $protfile);
while (my $file = <FH>) {
print ("$file");
}
Run Code Online (Sandbox Code Playgroud) 每当我尝试使用它们具有的任何列粘贴多个文件时,我都会遇到在文件之间创建的空白列的问题。
比如我要粘贴五个文件,每个文件包含五列:
paste file1 file2 file3 file4 file5
Run Code Online (Sandbox Code Playgroud) 我是Perl的初学者.我有一个文件两列.我想比较第一列(作为参考)和第二列(测试):
pppqqrrsttqrstrr pppqrrrsttqrstrr
if p in ref =~ p in test print p
if q in ref =~ q in test print q
if r in ref =~ r in test print r
if s in ref =~ s in test print s
if t in ref =~ t in test print W
if q in ref =~ r in test print w
Run Code Online (Sandbox Code Playgroud)
所以输出: pppqwrrsWWqrsWrr
我试过了:
#!/usr/bin/perl
use warnings;
use strict;
open my $F1, '>', 'match' or die $!;
while(<>){ …Run Code Online (Sandbox Code Playgroud) 我知道=~ s/(.)\s/$1/seg用空白替换额外的分隔空间但是做什么$1和seg意味着什么?