|
1 | 1 | /* |
2 | 2 | * |
3 | | -RCaller, A solution for calling R from Java |
4 | | -Copyright (C) 2010-2014 Mehmet Hakan Satman |
| 3 | + RCaller, A solution for calling R from Java |
| 4 | + Copyright (C) 2010-2014 Mehmet Hakan Satman |
5 | 5 |
|
6 | | -This program is free software: you can redistribute it and/or modify |
7 | | -it under the terms of the GNU Lesser General Public License as published by |
8 | | -the Free Software Foundation, either version 3 of the License, or |
9 | | -any later version. |
| 6 | + This program is free software: you can redistribute it and/or modify |
| 7 | + it under the terms of the GNU Lesser General Public License as published by |
| 8 | + the Free Software Foundation, either version 3 of the License, or |
| 9 | + any later version. |
10 | 10 |
|
11 | | -This program is distributed in the hope that it will be useful, |
12 | | -but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | | -GNU General Public License for more details. |
| 11 | + This program is distributed in the hope that it will be useful, |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + GNU General Public License for more details. |
15 | 15 |
|
16 | | -You should have received a copy of the GNU Lesser General Public License |
17 | | -along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + You should have received a copy of the GNU Lesser General Public License |
| 17 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 | * |
19 | 19 | * |
20 | 20 | * Mehmet Hakan Satman - mhsatman@yahoo.com |
|
23 | 23 | * Please visit the blog page with rcaller label: |
24 | 24 | * http://stdioe.blogspot.com.tr/search/label/rcaller |
25 | 25 | */ |
26 | | - |
27 | 26 | package rcaller; |
28 | 27 |
|
29 | 28 | import graphics.DefaultTheme; |
30 | 29 | import graphics.GraphicsTheme; |
31 | 30 |
|
32 | 31 | public class Globals { |
33 | 32 |
|
34 | | - public static String cranRepos = "http://cran.r-project.org"; |
35 | | - public static String RScript_Windows = "C:\\Program Files\\R\\R-3.0.2\\bin\\Rscript.exe"; |
36 | | - public static String RScript_Linux = "/usr/bin/Rscript"; |
37 | | - public static String Rscript_current; |
38 | | - public static String R_Windows = "C:\\Program Files\\R\\R-3.0.2\\bin\\R.exe"; |
39 | | - public static String R_Linux = "/usr/bin/R"; |
40 | | - public static String R_current; |
41 | | - |
42 | | - public static GraphicsTheme theme = new DefaultTheme(); |
43 | | - |
44 | | - public final static String version = "RCaller 2.0"; |
45 | | - public final static String about = "Author: Mehmet Hakan Satman - mhsatman@yahoo.com"; |
46 | | - public final static String licence = "LGPL v3.0"; |
47 | | - |
48 | | - |
49 | | - public static void detect_current_rscript() { |
50 | | - if (System.getProperty("os.name").contains("Windows")) { |
51 | | - Rscript_current = RScript_Windows; |
52 | | - R_current = R_Windows; |
53 | | - } else { |
54 | | - Rscript_current = RScript_Linux; |
55 | | - R_current = R_Linux; |
56 | | - } |
57 | | - } |
| 33 | + public static String cranRepos = "http://cran.r-project.org"; |
| 34 | + public static String RScript_Windows = "C:\\Program Files\\R\\R-3.0.2\\bin\\Rscript.exe"; |
| 35 | + public static String RScript_Linux = "/usr/bin/Rscript"; |
| 36 | + public static String Rscript_current; |
| 37 | + public static String R_Windows = "C:\\Program Files\\R\\R-3.0.2\\bin\\R.exe"; |
| 38 | + public static String R_Linux = "/usr/bin/R"; |
| 39 | + public static String R_current; |
| 40 | + |
| 41 | + public static GraphicsTheme theme = new DefaultTheme(); |
| 42 | + |
| 43 | + public final static String version = "RCaller 2.0"; |
| 44 | + public final static String about = "Author: Mehmet Hakan Satman - mhsatman@yahoo.com"; |
| 45 | + public final static String licence = "LGPL v3.0"; |
| 46 | + |
| 47 | + public static void detect_current_rscript() { |
| 48 | + if (System.getProperty("os.name").contains("Windows")) { |
| 49 | + Rscript_current = RScript_Windows; |
| 50 | + R_current = R_Windows; |
| 51 | + } else { |
| 52 | + Rscript_current = RScript_Linux; |
| 53 | + R_current = R_Linux; |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + public static boolean isWindows() { |
| 58 | + if (System.getProperty("os.name").contains("Windows")) { |
| 59 | + return (true); |
| 60 | + } else { |
| 61 | + return (false); |
| 62 | + } |
| 63 | + } |
58 | 64 | } |
0 commit comments