Hi

I'm using RCom from within Delphi (thanks to Dr. Dieter Menne). Unfortunately some commands don't work. For example I can not send the "source" command with the EvaluateNoReturn. I always get an exception with the message "Das Objekt ist statisch. Der Vorgang ist nicht erlaubt." (the object is static. operation is not allowed.)
The file conatains the following code:

for (i in 1:length(c)) {
  if (raster) {
    asc<-ud[[i]][[1]];
    res <- asc2spixdf(asc);
writeGDAL(res, paste(path,ver_raster[i], sep=""), drivername = "GTiff", type = "Float32");
  }
  if (shape) {
    shp<-convert.to.shapefile(c[[i]], shpd[[i]], "Id", 5);
out.files<-write.shapefile(shp, paste(path, ver_shape[i], sep = "", collapse = NULL), arcgis=T);
  }

  resolution <- attr(asc, "cellsize");

z<-"insert into home_ranges (the_geom, id_group, probability, notes, id_selection_code, hr_method, resolution, smoothing_parameters, superface_probability) VALUES (GeomFromText('MULTIPOLYGON(((";
  for (q in 1:length(c[[i]][[1]])) {
    z<-paste(z,c[[i]][[2]][q]," ",c[[i]][[3]][q],sep="");
if (q < length(c[[i]][[1]]) & (as.integer(c[[i]][[1]][q+1]) > as.integer(c[[i]][[1]][q])))
          z<-paste(z,")),((", sep="")
        else
          (if (q < length(c[[i]][[1]])) z<-paste(z,",", sep=""));
  }

z<-paste(z,")))',4326),'", names(c[i]), "',", lev, ",'" , "This is a test", "', '", id_selection_code, "', '", h, "', '", resolution, "', '", hlimX, "', '", paste(path,ver_raster[i], sep=""), "')", sep="");

  result <- c(result, z);
}

When I try to transmit the content of the file in one EvaluateNoReturn command I get the OleException "Die Quellklasse des verknüpften Objekts hat sich geändert" (the source class of the linked object has changed). I get the same error when I try to embed the code in a function (like "func<- function() {...}").

Anybody able to help me here? Thanks in advance!

        Veit

--
___________________________________________________________________

 Dipl.-Ing. Veit Zimmermann     [EMAIL PROTECTED]
 VECTRONIC Aerospace GmbH              www.vectronic-aerospace.com
 Carl-Scheele-Str. 12                         tel: +49 30 67894990
 D-12489 Berlin                               fax: +49 30 67895230
 Germany                              WGS84: 52°25.83'N 13°31.52'E

Geschaeftsfuehrer Amtsgericht Charlottenburg HRB 76691 Pius Butz, Robert Schulte Sitz der Gesellschaft: Berlin
___________________________________________________________________
_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to