[Seqinr-commits] r1752 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 14 11:12:06 CEST 2010
Author: simonpenel
Date: 2010-10-14 11:12:04 +0200 (Thu, 14 Oct 2010)
New Revision: 1752
Modified:
pkg/R/read.abif.R
Log:
The error generated by the rawToChar function is now detected, fixed and signaled.
Modified: pkg/R/read.abif.R
===================================================================
--- pkg/R/read.abif.R 2010-09-10 09:23:48 UTC (rev 1751)
+++ pkg/R/read.abif.R 2010-10-14 09:12:04 UTC (rev 1752)
@@ -113,7 +113,10 @@
# unsigned 8 bits integer:
if(elementtype == 1) res$Data[[i]] <- UInt8(data, n = numelements)
# char or signed 8 bits integer
- if(elementtype == 2) res$Data[[i]] <- RTC(data)
+ if(elementtype == 2){
+ res$Data[[i]] <- tryCatch(RTC(data),finally=paste(rawToChar(data,multiple=TRUE),collapse=""),error=function(er){cat(paste("an error was detected with the following message:",er," but this error was fixed\n",sep=" "))})
+ }
+
# unsigned 16 bits integer:
if(elementtype == 3) res$Data[[i]] <- UInt16(data, n = numelements)
# short:
More information about the Seqinr-commits
mailing list