[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: Calling R in ferret



Thanks Ryo,

I am already saving the data in a text file in ferret and imporiting that in R, which works just fine. I was wondering if that could be further simplified, but that doesn't seems to be a possibility.

I don't think a character string would work (even if its possible to pass it to R, which I don't know) unless each number string can again be given identity as a vector element. That would be rather complicated I imagine. So I would stick with your second suggestion.

Jagadish

From: Ryo Furue <furue@xxxxxxxxxx>
To: j_karmacharya@xxxxxxxxx
Cc: ferret_users@xxxxxxxx
Sent: Saturday, February 16, 2013 11:19 PM
Subject: Re: [ferret_users] Re: Calling R in ferret

Jagadish

> I need to pass an array ( v in your example).
> Is this not possible?

I don't think it's possible to pass a vector object,
but if R accepts something like

  shapiro.test([1,4,9,16])

then it is probably possible to construct a character string
"[1,4,9,16]" within Ferret and pass it to R.

But, I would think it's a lot easier

1) for Ferret to write the elements of your vector into an
  external file; and

2) for R to read the values from it.

For (1), you can use the LIST command of Ferret
to write the elements of your vector into an external
text file.

For (2), you would need to figure out how R reads from files.

Cheers,
Ryo



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement