Skip to content
Prev 361786 / 398506 Next

Writing R package that call Fortran codes

alpha = as.double(alpha), beta = as.double(beta), x = as.double(0,
 length = n), y = as.double(0, length = n), tau = as.integer(0,
 length = n))

Are you expecting that
    as.integer(0, length=n)
and
    as.double(0, length = n)
will produce vectors of length 'n'?  They do not and short inputs will
usually
cause memory misuse and crashes in the Fortran code.



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Jun 16, 2016 at 10:03 AM, Kodalore Vijayan, Vineetha W <
vwkv13 at mun.ca> wrote: