[R] How to call time series functions from C ?

2009-05-07 Thread goon83
Hi everyone,
  I meet the problem to call R from C. 
 
  Can someone tell me is it possible to call time series functions(such as ar 
and arima)from  C program on linux platform, and then compile the C program to 
a standalone executable file?

  I know we can call some function defined in Rmath.h , but I have not found 
the entry point for time series function. 
 
  I would very much appreciate receiving your response ! ^_^


bin, dong
goo...@126.com
Buaa, Beijing PR China

  

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch

On 5/7/2009 9:24 AM, goon83 wrote:

Hi everyone,
  I meet the problem to call R from C. 
 
  Can someone tell me is it possible to call time series functions(such as ar and arima)from  C program on linux platform, and then compile the C program to a standalone executable file?


  I know we can call some function defined in Rmath.h , but I have not found the entry point for time series function. 


There are none, but you can write a front end for R, and it can evaluate 
R expressions, etc.  The procedure is described in the Writing R 
Extensions manual.


Remember that if you distribute the program you do need to follow the 
GPL, and distribute all of R as well as all of your own program in 
source code form.


Duncan Murdoch

 
  I would very much appreciate receiving your response ! ^_^



bin, dong
goo...@126.com
Buaa, Beijing PR China

  


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread goon83
hi Duncan,
 
tks for you response, it's depressed to know that i can not use time series of 
R to finish my study.
 
I really think R is powerfull, i used it to finish all my statistic homework 
last year^_^.
 
but i still wonder can i use the function of time series in the embedded way of 
C code.
 
 
Can you give me some suggestion about how to use time series of R in C code?
 
 
 
tks 
 

bin dong 
goo...@126.com
Buaa, Beijing PR China
 
 


 


ÔÚ2009-05-07?21:51:13£¬Duncan?Murdoch?murd...@stats.uwo.ca?дµÀ£º
On?5/7/2009?9:24?AM,?goon83?wrote:
?Hi?everyone,
???I?meet?the?problem?to?call?R?from?C.?
??
???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
?
???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?

There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
Extensions?manual.

Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
source?code?form.

Duncan?Murdoch

??
???I?would?very?much?appreciate?receiving?your?response?!?^_^
?
?
?bin,?dong
?goo...@126.com
?Buaa,?Beijing?PR?China
?
???
?
? [[alternative?HTML?version?deleted]]
?
?__
?r-h...@r-project.org?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.


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch

On 5/7/2009 10:55 AM, goon83 wrote:

hi Duncan,
 
tks for you response, it's depressed to know that i can not use time series of R to finish my study.
 
I really think R is powerfull, i used it to finish all my statistic homework last year^_^.
 
but i still wonder can i use the function of time series in the embedded way of C code.
 
 
Can you give me some suggestion about how to use time series of R in C code?


I did, in the previous message.

Duncan Murdoch

 
 
 
tks 
 

bin dong 
goo...@126.com

Buaa, Beijing PR China
 
 



 



??2009-05-07?21:51:13??Duncan?Murdoch?murd...@stats.uwo.ca???

On?5/7/2009?9:24?AM,?goon83?wrote:

?Hi?everyone,
???I?meet?the?problem?to?call?R?from?C.?
??
???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
?
???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?


There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
Extensions?manual.

Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
source?code?form.

Duncan?Murdoch


??
???I?would?very?much?appreciate?receiving?your?response?!?^_^
?
?
?bin,?dong
?goo...@126.com
?Buaa,?Beijing?PR?China
?
???
?
?   [[alternative?HTML?version?deleted]]
?
?__
?r-h...@r-project.org?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.






__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread goon83
Hi Duncan,

Sorry, i miss the informatin in the previous message,  you said  that i can 
write a front end  to call , does the front end can be implemented by c, and 
i can compile the c code to a standalone program. i will appreiciate for more 
detail information


tks? 
? 

?bin?dong?
?goo...@126.com
?Buaa,?Beijing?PR?China


ÔÚ2009-05-07?23:05:47£¬Duncan?Murdoch?murd...@stats.uwo.ca?дµÀ£º
On?5/7/2009?10:55?AM,?goon83?wrote:
?hi?Duncan,
??
?tks?for?you?response,?it's?depressed?to?know?that?i?can?not?use?time?series?of?R?to?finish?my?study.
??
?I?really?think?R?is?powerfull,?i?used?it?to?finish?all?my?statistic?homework?last?year^_^.
??
?but?i?still?wonder?can?i?use?the?function?of?time?series?in?the?embedded?way?of?C?code.
??
??
?Can?you?give?me?some?suggestion?about?how?to?use?time?series?of?R?in?C?code?

I?did,?in?the?previous?message.

Duncan?Murdoch

??
??
??
?tks?
??
?
?bin?dong?
?goo...@126.com
?Buaa,?Beijing?PR?China
??
??
?
?
??
?
?
?ÔÚ2009-05-07?21:51:13£¬Duncan?Murdoch?murd...@stats.uwo.ca?дµÀ£º
On?5/7/2009?9:24?AM,?goon83?wrote:
?Hi?everyone,
???I?meet?the?problem?to?call?R?from?C.?
??
???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
?
???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?

There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
Extensions?manual.

Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
source?code?form.

Duncan?Murdoch

??
???I?would?very?much?appreciate?receiving?your?response?!?^_^
?
?
?bin,?dong
?goo...@126.com
?Buaa,?Beijing?PR?China
?
???
?
?   [[alternative?HTML?version?deleted]]
?
?__
?r-h...@r-project.org?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.

?


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread Whit Armstrong
you have a couple of options.

If you require specific R functions to do what you want, then you will
need to call R from C.

I believe that Dirk has been working on an RInside package that does this.

Alternatively, you can use my tslib package, which is a general time
series library written in c++.

It's public interface in R, is the fts package, which just wraps the
c++ library to R functions.

sources are available here:
http://github.com/armstrtw/tslib/tree/master
http://github.com/armstrtw/fts/tree/master

If you want to try out tslib, feel free to contact me off list for help.

-Whit

2009/5/7 Duncan Murdoch murd...@stats.uwo.ca:
 On 5/7/2009 10:55 AM, goon83 wrote:

 hi Duncan,
  tks for you response, it's depressed to know that i can not use time
 series of R to finish my study.
  I really think R is powerfull, i used it to finish all my statistic
 homework last year^_^.
  but i still wonder can i use the function of time series in the embedded
 way of C code.
   Can you give me some suggestion about how to use time series of R in C
 code?

 I did, in the previous message.

 Duncan Murdoch

    tks  
 bin dong goo...@126.com
 Buaa, Beijing PR China




 在2009-05-07?21:51:13,Duncan?Murdoch?murd...@stats.uwo.ca?写道:

 On?5/7/2009?9:24?AM,?goon83?wrote:

 ?Hi?everyone,
 ???I?meet?the?problem?to?call?R?from?C.?
 ??

 ???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
 ?

 ???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?

 There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
 R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
 Extensions?manual.

 Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
 GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
 source?code?form.

 Duncan?Murdoch

 ??
 ???I?would?very?much?appreciate?receiving?your?response?!?^_^
 ?
 ?
 ?bin,?dong
 ?goo...@126.com
 ?Buaa,?Beijing?PR?China
 ?
 ???
 ?
 ?       [[alternative?HTML?version?deleted]]
 ?
 ?__
 ?r-h...@r-project.org?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.




 __
 R-help@r-project.org 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.



__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread Gabor Grothendieck
Do you have to use the entire xxxGB at once?  If not store it in a database
and fetch the portions for the current analysis as you need them.

On Thu, May 7, 2009 at 10:55 AM, goon83 goo...@126.com wrote:
 hi Duncan,

 tks for you response, it's depressed to know that i can not use time series 
 of R to finish my study.

 I really think R is powerfull, i used it to finish all my statistic homework 
 last year^_^.

 but i still wonder can i use the function of time series in the embedded way 
 of C code.


 Can you give me some suggestion about how to use time series of R in C code?



 tks

 
 bin dong
 goo...@126.com
 Buaa, Beijing PR China







 在2009-05-07?21:51:13,Duncan?Murdoch?murd...@stats.uwo.ca?写道:
On?5/7/2009?9:24?AM,?goon83?wrote:
?Hi?everyone,
???I?meet?the?problem?to?call?R?from?C.?
??
???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
?
???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?

There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
Extensions?manual.

Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
source?code?form.

Duncan?Murdoch

??
???I?would?very?much?appreciate?receiving?your?response?!?^_^
?
?
?bin,?dong
?goo...@126.com
?Buaa,?Beijing?PR?China
?
???
?
? [[alternative?HTML?version?deleted]]
?
?__
?r-h...@r-project.org?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.


[[alternative HTML version deleted]]


 __
 R-help@r-project.org 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.



__
R-help@r-project.org 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.


Re: [R] How to call time series functions from C ?

2009-05-07 Thread Duncan Murdoch

On 5/7/2009 11:17 AM, goon83 wrote:

Hi Duncan,

Sorry, i miss the informatin in the previous message,  you said  that i can write a 
front end  to call , does the front end can be implemented by c, and i can 
compile the c code to a standalone program. i will appreiciate for more detail information


See the Writing R Extensions manual, as I said in the original reply.

Duncan Murdoch




tks? 
? 


?bin?dong?
?goo...@126.com
?Buaa,?Beijing?PR?China


??2009-05-07?23:05:47??Duncan?Murdoch?murd...@stats.uwo.ca???

On?5/7/2009?10:55?AM,?goon83?wrote:

?hi?Duncan,
??
?tks?for?you?response,?it's?depressed?to?know?that?i?can?not?use?time?series?of?R?to?finish?my?study.
??
?I?really?think?R?is?powerfull,?i?used?it?to?finish?all?my?statistic?homework?last?year^_^.
??
?but?i?still?wonder?can?i?use?the?function?of?time?series?in?the?embedded?way?of?C?code.
??
??
?Can?you?give?me?some?suggestion?about?how?to?use?time?series?of?R?in?C?code?


I?did,?in?the?previous?message.

Duncan?Murdoch


??
??
??
?tks?
??
?
?bin?dong?
?goo...@126.com
?Buaa,?Beijing?PR?China
??
??
?
?
??
?
?
???2009-05-07?21:51:13??Duncan?Murdoch?murd...@stats.uwo.ca???

On?5/7/2009?9:24?AM,?goon83?wrote:

?Hi?everyone,
???I?meet?the?problem?to?call?R?from?C.?
??
???Can?someone?tell?me?is?it?possible?to?call?time?series?functions(such?as?ar?and?arima)from??C?program?on?linux?platform,?and?then?compile?the?C?program?to?a?standalone?executable?file?
?
???I?know?we?can?call?some?function?defined?in?Rmath.h?,?but?I?have?not?found?the?entry?point?for?time?series?function.?


There?are?none,?but?you?can?write?a?front?end?for?R,?and?it?can?evaluate?
R?expressions,?etc.??The?procedure?is?described?in?the?Writing?R?
Extensions?manual.

Remember?that?if?you?distribute?the?program?you?do?need?to?follow?the?
GPL,?and?distribute?all?of?R?as?well?as?all?of?your?own?program?in?
source?code?form.

Duncan?Murdoch


??
???I?would?very?much?appreciate?receiving?your?response?!?^_^
?
?
?bin,?dong
?goo...@126.com
?Buaa,?Beijing?PR?China
?
???
?
?   [[alternative?HTML?version?deleted]]
?
?__
?r-h...@r-project.org?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.



?






__
R-help@r-project.org 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.