Re: [R] export VTK from R : impossible to write data as float

2010-07-07 Thread yepri
So, the problem was that R exports only double sized floats (double), and Paraview requires single sized floats. The solution was just to write : writeBin(data,bfile_celldata,endian="swap",size=4) Special Thanks to Sebastian Gibb : http://www.mail-archive.com/r-help@r-project.org/msg100994.htm

[R] export VTK from R : impossible to write data as float

2010-07-05 Thread alexandre pryet
Hello, I've written a short code (below) to write 3D unstructured grid to binary VTK files from R. Problem : I can only write integers with the command : data<-as.numeric(c(3.3)) storage.mode(data)<-'integer' writeBin(data,bfile_celldata,endian="swap") the function storage.mode(data)<-'long' loo