[R] problem in textConnection function

From: Michael S <michael_shen_at_hotmail.com>
Date: Tue 22 Mar 2005 - 13:58:43 EST


Dear all-helpers:

I create one package ,code like this:
"output" <-
function(x,y)
{

	zz <-textConnection("foo","w")
	sink(zz)
	a <-5
	b <-6
	z <-a*b
	z
	e <-"spss"
	h <-c(1,2,3)
	ls()
	r<-c("s","p","s","s")
	p<-list(1:10)
	p
	sink()
                close(zz)
	x <- foo
                y <- foo

    # .C("output",as.character(x),as.character(y)) }

packege making is ok , but when I use "output" in Rgui, none of object x ory can get the result what I expect(textConnection result),when I copy the code and paste on Rgui ,it is ok.what should I do ?

thanks in advance



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Mar 22 14:05:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:52 EST