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
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
2 matches
Mail list logo