On 9/10/2007 10:26 AM, Sigbert Klinke wrote: > Hi, > > > sapply(formals("readBin"), mode) > con what n size signed endian > "name" "name" "numeric" "logical" "logical" "call" > > returns for the mode of size logical. But in the documentation is said > that size should be integer. Does anyone know why the mode is logical?
The default value is NA, and the mode of NA is logical. (It will automatically be promoted into another type if included in a vector, e.g. c(1:2, NA) promotes it to integer, c(3.14, NA) promotes it to numeric.) More generally, I'd say reading the man page or the source is a better way to find out about the requirements for the arguments of a function. Duncan Murdoch ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.