Skip to content
Back to formatted view

Raw Message

Message-ID: <1E277F00-4D0E-4F18-AB3C-0A2E08150033@xs4all.nl>
Date: 2016-06-16T19:19:01Z
From: Berend Hasselman
Subject: Writing R package that call Fortran codes
In-Reply-To: <A0CB18EC-3369-454F-92CE-D92919204FCC@gmail.com>

> On 16 Jun 2016, at 21:04, Eduardo M. A. M.Mendes <emammendes at gmail.com> wrote:
> 
> 
>> On Jun 16, 2016, at 3:50 PM, Berend Hasselman <bhh at xs4all.nl> wrote:
>> 
>> 
>>> On 16 Jun 2016, at 20:02, Eduardo M. A. M.Mendes <emammendes at gmail.com> wrote:
>>> 
>>> Thanks  Bill for pointing this out.  I haven?t noticed it.
>>> 
>>> Vineetha, try as.double(rep(0,n)) or as.matrix(rep(0,n)),
>>> 
>> 
>> Why not simply numeric(n)?
>> 
>> Berend Hasselman
>> 
> 
> as.numeric(rep(0,n)) works too. Please remember that he wants a vector nor a scalar.
> 

Indeed it does. And I certainly remembered that the OP wants a vector of length n.
But so does numeric(n), which creates a length n vector. Just try numeric(2).

Berend