[R] embedding R: plot freezing
    Elena Zheleva 
    zynnel at yahoo.com
       
    Sun Apr 13 00:17:50 CEST 2003
    
    
  
i have a problem with plotting dataframes from an R
interpreter set up in another application (using C and
GTK).
i have the following two functions in two separate
files:
loadDataFrame <- function(filename, analysisDF){
	tempfile <- "bla"
	d <- read.table(tempfile, header=TRUE)  
	d <<- d
}
finalDC <- function(){ 
	print(d)
	##create an empty plot 
	xlim <- range(d[,1], na.rm=TRUE)
	ylim <- range(d[,-1], na.rm=TRUE)
	plot(NA, xlim=xlim, ylim=ylim, xlab="x", ylab="y")
	title("DC Analysis", "All nodes")
	##plot the data
	for (k in 2:ncol(d))
		lines(d[,1], d[,k], col=k-1)
}
if i invoke these directly from R, they work just
fine. when i invoke them from the R interpreter set up
in my application, the dataframe prints out and then
one of two things happens. i either get a segmentation
fault, or the plot displays and freezes, so i cannot
close it. 
currently, i have R initialized with the following
args:
char *argv[] = {"simulus", "--no-save", "--silent"};
does anyone have any idea why? thank you very much in
advance.
elena zheleva
    
    
More information about the R-help
mailing list