1
我正在尝试获取摘要以不包装其输出。但是,当我使用5列数据调用摘要时,它将第5列放在单独的行上。我希望有一种方法比手动打印遍历由摘要返回的对象更容易。我如何告诉摘要不要换行?
最好的问候,
约瑟夫
plotit.r
#!/usr/bin/Rscript
noneData <- read.csv("query.log", header=FALSE, sep="\t");
cnames = c('vids', 'partitions', 'localvert', 'remotevert',
'cachehits', 'responsetime');
colnames(noneData) <- cnames;
cachenames = c('1', '2', '3', '4', '5');
responseCompare = data.frame(
noneData$responsetime/1000000,
noneData$responsetime/1000000,
noneData$responsetime/1000000,
noneData$responsetime/1000000,
noneData$responsetime/1000000
);
colnames(responseCompare) <- cachenames;
print("Response Times");
summary(responseCompare);
./plotit.r #output:
[1] "Response Times"
1 2 3 4
Min. : 0.215 Min. : 0.215 Min. : 0.215 Min. : 0.215
1st Qu.: 395.202 1st Qu.: 395.202 1st Qu.: 395.202 1st Qu.: 395.202
Median : 459.888 Median : 459.888 Median : 459.888 Median : 459.888
Mean : 466.726 Mean : 466.726 Mean : 466.726 Mean : 466.726
3rd Qu.: 530.122 3rd Qu.: 530.122 3rd Qu.: 530.122 3rd Qu.: 530.122
Max. :3275.916 Max. :3275.916 Max. :3275.916 Max. :3275.916
5
Min. : 0.215
1st Qu.: 395.202
Median : 459.888
Mean : 466.726
3rd Qu.: 530.122
Max. :3275.916
'options(width = 120);猫(“响应时间”);摘要(responseCompare)' –
'summary'不包裹你的专栏,终端/你的gui是。 –
@RicardoSaporta:我的终端/ gui没有包装列。首先,我的终端足够大以显示所有列。其次,如果我输出到一个文件(./plotit.r> file.txt) – joseph