RInside Version 0.2.16
Main Page
+
Classes
Class List
+
Class Members
+
All
a
b
g
i
m
o
p
r
s
v
x
~
Functions
Variables
+
Files
File List
+
File Members
All
Functions
Variables
Macros
•
All
Classes
Files
Functions
Variables
Macros
RInside_C.cpp
Go to the documentation of this file.
1
2
// RInside_C.cpp: R/C++ interface class library -- Easier R embedding into C
3
//
4
// Copyright (C) 2020 - Lance Bachmeier and Dirk Eddelbuettel
5
//
6
// This file is part of RInside.
7
//
8
// RInside is free software: you can redistribute it and/or modify it
9
// under the terms of the GNU General Public License as published by
10
// the Free Software Foundation, either version 2 of the License, or
11
// (at your option) any later version.
12
//
13
// RInside is distributed in the hope that it will be useful, but
14
// WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with RInside. If not, see <http://www.gnu.org/licenses/>.
20
21
#include <
RInside.h
>
22
23
RInside
*
rr
= NULL;
24
25
extern
"C"
{
26
void
setupRinC
() {
27
if
(rr == NULL)
28
rr =
new
RInside
;
29
}
30
31
void
passToR
(SEXP x,
char
* name) {
32
if
(rr != NULL)
33
rr->
assign
(x, std::string(name));
34
}
35
36
SEXP
evalInR
(
char
* cmd) {
37
if
(rr != NULL)
38
return
rr->
parseEval
(std::string(cmd));
39
else
40
return
R_NilValue;
41
}
42
43
void
evalQuietlyInR
(
char
* cmd) {
44
if
(rr != NULL)
45
rr->
parseEvalQ
(std::string(cmd));
46
}
47
48
void
teardownRinC
() {
49
if
(rr != NULL) {
50
delete
rr
;
51
rr = NULL;
52
}
53
}
54
}
evalInR
SEXP evalInR(char *cmd)
Definition:
RInside_C.cpp:36
evalQuietlyInR
void evalQuietlyInR(char *cmd)
Definition:
RInside_C.cpp:43
passToR
void passToR(SEXP x, char *name)
Definition:
RInside_C.cpp:31
setupRinC
void setupRinC()
Definition:
RInside_C.cpp:26
RInside::parseEvalQ
void parseEvalQ(const std::string &line)
Definition:
RInside.cpp:384
RInside::parseEval
int parseEval(const std::string &line, SEXP &ans)
Definition:
RInside.cpp:326
RInside.h
rr
RInside * rr
Definition:
RInside_C.cpp:23
RInside::assign
void assign(const T &object, const std::string &nam)
Definition:
RInside.h:78
RInside
Definition:
RInside.h:29
teardownRinC
void teardownRinC()
Definition:
RInside_C.cpp:48
src
RInside_C.cpp
Generated on Wed Mar 11 2020 22:33:48 for RInside Version 0.2.16 by
1.8.13