search for: bfile_celldata

Displaying 1 result from an estimated 1 matches for "bfile_celldata".

2010 Jul 05
1
export VTK from R : impossible to write data as float
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' looks fine, but the VTK file is not readable. thanks for any help or comments, #----- R SCRIPT TO WRITE A CUBE IN VTK FORMAT cat('# vtk DataFile Version 3.0\n',file="vtk_header") cat('R Binary Expo...