Replying with some code.

input<- readLines(textConnection("
  6.2   httpd (18)
  4.0   httpd (11)
  4.0   httpd (11)
  3.3   httpd (9)
  4.2   httpd (12)
  4.2        httpd (12)
  4.2   httpd (12)
  4.2   httpd (12)
  4.2   httpd (12)
"))

data<-input[input!=""]

> data
[1] "  6.2 httpd (18)"   "  4.0 httpd (11)"   "  4.0 httpd (11)"   "  3.3 
httpd (9)" 
[5] "  4.2 httpd (12)"   "  4.2   httpd (12)" "  4.2 httpd (12)"   "  4.2 
httpd (12)" 
[9] "  4.2 httpd (12)" 

m <- t(sapply(1:1,function(x) unlist(strsplit(data," +"))))

   [,1] [,2]  [,3]    [,4]   [,5] [,6]  [,7]    [,8]   [,9] [,10] [,11] 
[,12]  [,13] [,14]
[1,] ""   "6.2" "httpd" "(18)" ""   "4.0" "httpd" "(11)" ""   "4.0" 
"httpd" "(11)" ""    "3.3"
     [,15]   [,16] [,17] [,18] [,19]   [,20]  [,21] [,22] [,23]   [,24] 
[,25] [,26] [,27] 
[1,] "httpd" "(9)" ""    "4.2" "httpd" "(12)" ""    "4.2" "httpd" "(12)" 
""    "4.2" "httpd"
     [,28]  [,29] [,30] [,31]   [,32]  [,33] [,34] [,35]   [,36] 
[1,] "(12)" ""    "4.2" "httpd" "(12)" ""    "4.2" "httpd" "(12)"


What I want to do is this ?

  6.2   httpd       18
  4.0   httpd       11
  4.0   httpd       11
  3.3   httpd        9)
  4.2   httpd       12
  4.2        httpd        12
  4.2   httpd       12
  4.2   httpd       12
  4.2   httpd       12


Thanks,
Mohan



From:   mohan.radhakrishnan@polarisft.com
To:     r-help@r-project.org
Date:   09/20/2013 10:44 AM
Subject:        [R] Averate memory usage trend
Sent by:        r-help-bounces@r-project.org



Hi,

        I would like to understand how to draw a graph to find out the 
average memory used by a single httpd process given these details 
collected over a period of
several days. I code R but this is about a method to find an average 
memory utilization. I believe I have enough data.

How should I statistically calculate this ? 

The figures inside braces are the total httpd processes at that time. Will 

there be an error  margin if I have combined totals like this ?

Sample data :

  Private     Shared     RAM used       Program 
  4.0 MiB    3.3 MiB        7.2 MiB     httpd (11)
  3.3 MiB    3.0 MiB       6.3 MiB      httpd (9)
  4.2 MiB    3.3 MiB      7.5 MiB       httpd (12)


Thanks,
Mohan



This e-Mail may contain proprietary and confidential information and is 
sent for the intended recipient(s) only.  If by an addressing or 
transmission error this mail has been misdirected to you, you are 
requested to delete this mail immediately. You are also hereby notified 
that any use, any form of reproduction, dissemination, copying, 
disclosure, modification, distribution and/or publication of this e-mail 
message, contents or its attachment other than by its intended recipient/s 
is strictly prohibited.

Visit us at http://www.polarisFT.com

                 [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

	[[alternative HTML version deleted]]

