R Error: “Error in readBin(fileR, “integer”, n = Length/2, size = 2, signed = TRUE, : invalid ‘n’ argument”

October 15, 2012
By

(This article was first published on Gary Sieling » R, and kindly contributed to R-bloggers)

The following error is an indication that an exceptional I/O error occurred. For instance, permissions denied, out of memory, etc. Normally the syntax of this error would indicate that a required parameter is missing from a function call, but with readBin it appears to be more often an exception.

Error in readBin(fileR, "integer", n = Length/2, size = 2, signed = TRUE,  :
  invalid 'n' argument

For instance, I get this attempting to load a 30+ MB audio file into memory in the x64bit R:

audio<-loadSample("a_YR4dKArgo.wav")

To leave a comment for the author, please follow the link and comment on his blog: Gary Sieling » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.