Hi , I have a function which passes a vector from R to C. However the size of the vector is decided inside the c program. But as I have to pass the size while calling the function from R lot of my space is getting wasted. Is there any other alternative?
I call c function as : hi<-.C("main",v1=as.double(vector("double",1000)),v2=as.double(vector("double",1000)),v3=as.double(vector("double",1000)),v4=as.double(vector("double",1000)),"points.csv",as.integer(15000),"quad.csv") Here if only 250 space are filled then in remaining 750 space 0.0 is returned and I don't want that moreover I want that the resultant vector should be returned back to R. Thanks [[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.