RInside Version 0.2.16
rinside_sample0.cpp
Go to the documentation of this file.
1
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8; -*-
2
//
3
// Simple example showing how to do the standard 'hello, world' using embedded R
4
//
5
// Copyright (C) 2009 Dirk Eddelbuettel
6
// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
7
//
8
// GPL'ed
9
10
#include <
RInside.h
>
// for the embedded R via RInside
11
12
int
main
(
int
argc,
char
*argv[]) {
13
14
RInside
R(argc, argv);
// create an embedded R instance
15
16
R[
"txt"
] =
"Hello, world!\n"
;
// assign a char* (string) to 'txt'
17
18
R.
parseEvalQ
(
"cat(txt)"
);
// eval the init string, ignoring any returns
19
20
exit(0);
21
}
22
RInside::parseEvalQ
void parseEvalQ(const std::string &line)
Definition:
RInside.cpp:384
RInside.h
main
int main(int argc, char *argv[])
Definition:
rinside_sample0.cpp:12
RInside
Definition:
RInside.h:29
inst
examples
standard
rinside_sample0.cpp
Generated on Wed Mar 11 2020 22:27:24 for RInside Version 0.2.16 by
1.8.13