Hello,
 
 
I have trouble with using data.frame data.
 
1. I loaded data using the following:
ff <- read.table("E:/R/VM/matrix.txt", header=T) 
The data I used is attached. 
 
I want to use at least 2 conditions for selecting of data. But I failed. 
 
It works. -> 
fff <- ff[ff$HG == "GUEST",] 
ffff <- fff[fff$WR == "READ",] 
 
But it doesn't work -> ff[ff$HG == "GUEST",ff$WR=="READ"]
 
How can I use 2 or more conditions together in one sentence ? 
 
2. I want to plot Throuput data using BlockSize as x-axis like the following:
plot(ffff$BlockSize, ffff$Throughput, type="o") 
 
But, Gap between 2 axis values are not consistent in the graph.
 
So I tried to use log() like the following:
plot( log(ffff$BlockSize), ffff$Throughput, type="o") 
 
The problem seems to be fixed. 
But x-axis sting is shown not as (1,2,4,8,16,32,64,128) but as (0,1,2,3,4,5), 
which is not my intention.
 
How can I fix this problem ? 
 
Thanks in advance, 
SK Park
 
Throughput  VM  HG  WR  BlockSize
210.25  KVM     HOST    WRITE   1
192.21  KVM     HOST    WRITE   2
210.25  KVM     HOST    WRITE   4
192.21  KVM     HOST    WRITE   8
210.25  KVM     HOST    WRITE   16
192.21  KVM     HOST    WRITE   32
210.25  KVM     HOST    WRITE   64
192.21  KVM     HOST    WRITE   128
510.25  KVM     HOST    READ    1
493.21  KVM     HOST    READ    2
510.25  KVM     HOST    READ    4
493.21  KVM     HOST    READ    8
502.25  KVM     HOST    READ    16
492.21  KVM     HOST    READ    32
510.25  KVM     HOST    READ    64
492.21  KVM     HOST    READ    128
210.25  KVM     GUEST   WRITE   1
192.21  KVM     GUEST   WRITE   2
210.25  KVM     GUEST   WRITE   4
192.21  KVM     GUEST   WRITE   8
210.25  KVM     GUEST   WRITE   16
192.21  KVM     GUEST   WRITE   32
210.25  KVM     GUEST   WRITE   64
192.21  KVM     GUEST   WRITE   128
510.25  KVM     GUEST   READ    1
532.21  KVM     GUEST   READ    2
520.25  KVM     GUEST   READ    4
522.21  KVM     GUEST   READ    8
510.25  KVM     GUEST   READ    16
503.21  KVM     GUEST   READ    32
530.25  KVM     GUEST   READ    64
509.21  KVM     GUEST   READ    128
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to