On Aug 24, 2010, at 5:15 PM, Michel Lutz wrote: > Thank you David for your answer. > > To be honest, I didn't read those posting guide, because I don't > know where to find it - I just get this email from N. Gunther. > So here the txt file, and sorry for having sent a wrong format. > > I checked out ?image and tested, that's why I think my current issue > is more the creation of the input matrix. > > About what I want... well... exactly as in Holtman, 2005, fig. 6, ie > being able to plot minutes within a day as x, days within a month as > y, and get the CPU% used represented in the frame, according to its > level of use (see enclosed). > > My input txt or csv file : > Col. 1 : time stamp like 'MM/DD/YYYY hh:mm' > Col. 2 : CPU use > (result of a SQL request) >
I see commas as decimal points so be sure to read the docs on read.table regarding dec argument. Looks like you need to create a new variable that casts those dates into a day of month (which is the y axis on that levelplot). I cannot read the x axis on the attached image. ??? maybe it was the hour of the day? Perhaps using strsplit() function on the "time stamp" variable (second element in the list of split elements) with " " as the separator and then parsing out an hour.of.day value. Then use the chron package to extract a day.of.month or probably simpler .... use strsplit with "/" as the separator on the first element of the first split. Final processing step tabulate the CPU_use by Day.of.month and Hour.of.day. Then you will have a matrix (since r-tables are of class table and matrix): Then image or levelplot with: X= hour; Y= day; Z= CPU_use -- David. > I will also try again ! > > Thanks for your support, > > Michel > > > > > On Tue, Aug 24, 2010 at 10:49 PM, David Winsemius <dwinsem...@comcast.net > > wrote: > > On Aug 24, 2010, at 2:56 PM, Michel Lutz wrote: > > Hello, > > As recommended by N. Gunther, I'm writing you because I have some > difficulties to create a script to track computer performance, as > done in > Holtman, 2005 (Visualization techniques for analysing patterns in > system > performance). > > I would like to do a leveplot, with the kind of file here enclosed. > > Nope. You probably did not read all the way to the end of the > Posting Guide to see what kinds of attachments are allowed on this > list. > > > > I assume I should create a matrix in R, then use the function 'image'. > > Maybe. There is an image function for base graphics: > > ?image > > First example is very similar to the first example in levelplot. > They have very similar data layout requirements. > > > > As I am not familiar with the lattice package, I have some > difficulties to > move ahead : I think my pb is in the creation of the matrix. I am > not able > to create sthing consistent with the image function. I am even > thinking I > should build my input csv file differently, but I am not sure how to > do... > > Is someone able to help me ? > > Given Jim's propensity to finish his emails with "What problem are > you trying to solve", let me beat him to the punch. What's you data > layout look like and what do you want the plot to look like? If you > can convert that file to plain text and make sure its file extension > is .txt, it will probably make it through if you resend it. > > You can get some other ideas for specifics by running the first > example on the levelplot help page: > > ?levelplot > > Lattice graphic do not mix well with base graphics so you need to > keep them segregated in your plotting kitchen if you want to remain > r-kosher. > > -- > David. > > > Thank you very much ! > > REgards, > > Michel > > > > ---------- Forwarded message ---------- > From: Red Roo <redr...@yahoo.com> > Date: Tue, Aug 24, 2010 at 3:46 PM > Subject: Re: [R-sig-hpc] Holtman's levelplot ? > To: Michel Lutz <micl...@gmail.com> > Cc: "r-sig-...@r-project.org" <r-sig-...@r-project.org>, redr...@yahoo.com > > > Michel, > > If you ask your plotting questions over at r-help@r-project.org, Jim > Holtman > will probably address them directly. He is also an instructor for my > "Guerrilla > Data Analysis Techniques" class > http://www.perfdynamics.com/Classes/Outlines/gdata.html and we just > discussed > this plot 2 weeks ago. > > > --Neil Gunther > > Taking The Pith Out Of Performance http://perfdynamics.blogspot.com/ > Follow me on Twitter http://twitter.com/DrQz > Performance Dynamics Company http://www.perfdynamics.com/ > > > > > On 08/24/2010 03:47 AM, Michel Lutz wrote: > > Hello to all, > > I am sorry for disturbing you, but I really don't know where/who to > ask... > so if this distribution list is not dealing with my concern, please > excuse > me... > > Here is my concern : I am trying to do a levelplot as in Holtman, 2005 > (Visualization techniques for analysing patterns in system performance > data), to display CPU usage according to the day of the month (y) and > minutes (x). > > I am familiar with R basic features, but not at all with lattice > package > and > I don't understand the logic of this leveplot function, especially > in the > particular case of a time series. > > I've read all the material found in the web, but I am completely > stuck... > > Does someone have some clues or documentation that could help me to > draw > such a plot ? (which is nothing new : the plot I'm dreaming of is the > Holtman's levelplot !). > > Thank you very much, and excuse-me if I'm not addressing the right > distribution list. > > Best regards, > > Michel Lutz > France - PhD Student > > David Winsemius, MD > West Hartford, CT > > > <CPU.txt><levelplot.jpg> David Winsemius, MD West Hartford, CT [[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.