[R] Three questions - loading(sourcing a file??), summaries to bitmaps, and error messages

Tony Vargas tvargas at cisco.com
Wed Feb 12 19:24:02 CET 2003

R helpers,

I have three questions about R and was wondering if I could get some help.

First, I am trying to send the output of a a summary command -
summary("info") to a bitmap file instead of the default device.  Anybody
know how to send a summary to a bitmap device?

Second - this question is more difficult.  What I am trying to do is have
Perl (because I already have the data structures loaded into
hashes) generate a gigantic R file that I can then have R source, and then
parse.  The output of the file(s) that I generate is below:

my.badger.Sep.2002.cpu.utilization <-
sep="=", header=TRUE) names(my.badger.Sep.2002.cpu.utilization)
attach(my.badger.Sep.2002.cpu.utilization) Tony Vargas Cisco Systems
Engineering Computing Services (408) 525-4113 tvargas at cisco.com
my.balvenie.Sep.2002.cpu.utilization <-
sep="=", header=TRUE) names(my.balvenie.Sep.2002.cpu.utilization)
my.bobcat.Sep.2002.cpu.utilization <-
sep="=", header=TRUE) names(my.bobcat.Sep.2002.cpu.utilization)
my.bowmore.Sep.2002.cpu.utilization <-
sep="=", header=TRUE) names(my.bowmore.Sep.2002.cpu.utilization)

etc. . . .

My "plotting" file looks like this:

bitmap(file =
"/auto/solperf/tgu/Images/badger.Sep.2002.usr.cpu.summary.thumbnail", type
= "png256", height = 6, width = 6, res = 72")
summary(my.badger.Sep.2002.cpu.utilization) bitmap(file =
"/auto/solperf/tgu/Images/badger.Sep.2002.usr.cpu.lines.thumbnail", type =
"png256", height = 6, width = 6, res = 72")
 lines(usr.cpu ~ Time, xlab = "Time", ylab = "%Usr CPU Utilization", main
= "badger's %Usr CPU Utilization Sep.2002")
 legend(0,0, usr.cpu) bitmap(file =
"/auto/solperf/tgu/Images/badger.Sep.2002.usr.cpu.scatter.thumbnail", type
= "png256", height = 6, width = 6, res = 72")
 plot(usr.cpu, main = "Scatter plot of badger's %Usr CPU Utilization
 legend(0,0, usr.cpu) bitmap(file =
"/auto/solperf/tgu/Images/badger.Sep.2002.usr.cpu.summary.large", type =

I tried having R do a "load" on my files, but I get the error messages

> load("rgraphfileload")
Error: bad restore file magic number (file may be corrupted)-- no data

Any idea why I would get the message above?  I am using R version 1.6.1 on
a Solaris host.



More information about the R-help mailing list