[R] Write signed short into a binary file (follow up and conclusion)(for real)

2006-08-29 Thread Luca Nanetti
Somebody pointed me to the right spot in the documentation, and kindly and humorously 'suggested' to me to do the following: My Apologies, everybody! I should have read docs a bit better, actually... ...will do better next time! luca - Original Message - From: [EMAIL PROTECTED] To:

[R] Write signed short into a binary file

2006-08-28 Thread [EMAIL PROTECTED]
I'm using R 2.3.1 on WinXPsp2, 32 bit What I want to do is to write a signed short integer (16 bit) (actually, a sequence of them) into a binary file. I'm trying with writeBin, but the what clause is not supported, and an integer is 4 bytes long, nor it seems to exist something like as.int

[R] Write signed short into a binary file (follow up and conclusion)

2006-08-28 Thread [EMAIL PROTECTED]
I've solved my problem using: (purpose: write the signed integer -19 as a two byte integer into a binary file) writeBin(as.integer(-19),myconnection, size=2) There is no need to coerce. Thanks anyway! Luca NanettiUniversity Medical Center Groningen BCN-NeuroImagingCenter A.Deusinglaan 2 9713AW