[R] Graph Problem
Balint, Jess
JBalint at alldata.net
Fri Nov 15 18:36:55 CET 2002
Hello all. I am having a very odd issue. I am using R 1.6.0 in Windows 2000.
I am creating some simple graphs. I changed one of my graphs from a pie to a
barplot, but when I run my program, it keeps exporting the pie graph again.
Can anybody see any problems in my code (following)? Thanks alot.
jess
__BEGIN__
path <- paste( "S:/JBalint/IN91X2/out/" )
sink( paste( path, "Build_Graphs.log" ) )
getmydata <- function( x, y ) read.table( file = paste( path, x, sep = "" ),
sep = "|", col.names = y )
addresstype <- getmydata( "01-address_type.dat", c( "Type", "Count", "i" ) )
names( addresstype$Count ) <- addresstype$Type
addresstype$Count <- addresstype$Count[order( addresstype$Type )]
png( filename = paste( path, "01-address_type.png", sep = "" ) )
pie( addresstype$Count, main = "Address Type" )
dev.off()
ageofname <- getmydata( "01-age_of_name.dat", c( "Age", "Count", "i" ) )
names( ageofname$Count ) <- ageofname$Age
ageofname$Count <- ageofname$Count[order( ageofname$Age )]
png( filename = paste( path, "01-age_of_name.png", sep = "" ) )
barplot( ageofname$Count / sum( ageofname$Count ) * 100, ylim = c( 0, max(
ageofname$Count ) / sum( ageofname$Count ) * 100 + 10 ), main = "Age of
Name", xlab = "Age in Years", ylab = "Percent of Total" )
dev.off()
...UNRELATED STUFF HERE NO OTHER EXPORTS...
save.image( file = paste( path, "Build_Graphs.RData" ), ascii = TRUE )
sink()
__END__
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list