From andy_liaw at merck.com  Thu Jan 12 16:49:34 2006
From: andy_liaw at merck.com (Liaw, Andy)
Date: Thu, 12 Jan 2006 10:49:34 -0500
Subject: [Rd] hello World problem
Message-ID: <39B6DDB9048D0F4DAD42CB26AAFF0AFAFED6F2@usctmx1106.merck.com>

See the `Value' section of ?.C.  Also, it's better to use the i/o provided
by the R API; i.e., something like:

#include "R.h"
void helloworld() {
    Rprintf("Hello world!\n");
}

Andy



From: Romain Francois
> 
> Hi,
> 
> I'm trying to build a simple R package 'helloWorld' with just one 
> function that prints 'hello World' on the C side.
> I agree that it is completely useless, but I just start 
> mixing R and C.
> 
> My C file is as follows :
> 
> #include <stdio.h>
> void helloWorld() {
>   printf("hello world !\n") ;
> }
> 
> When I call it from R, here is what happens :
> R> .C("helloWorld", PACKAGE = "helloWorld")
> hello world !
> list()
> 
> is it normal that 'list()' is printed ?
> 
> Thanks.
> 
> Romain
> 
> -- 
> visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
> mixmod 1.7 is released : 
> http://www-math.univ-> fcomte.fr/mixmod/index.php
> 
> 
> +---------------------------------------------------------------+
> | Romain FRANCOIS - http://francoisromain.free.fr               |
> | Doctorant INRIA Futurs / EDF                                  |
> +---------------------------------------------------------------+
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>



[Rd] hello World problem
Liaw, Andy