This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import org.rosuda.JRI.REXP; | |
import org.rosuda.JRI.Rengine; | |
public class RSample { | |
public static void main(String[] args) { | |
System.err.println(System.getenv("R_HOME")); | |
System.err.println(System.getenv("java.library.path")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import org.rosuda.JRI.REXP; | |
import org.rosuda.JRI.Rengine; | |
public class RSample { | |
public static void main(String[] args) { | |
System.out.println("R_HOME:" + System.getenv("R_HOME")); | |
System.out.println("java.library.path:" | |
+ System.getProperty("java.library.path")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.util.Vector; | |
import org.rosuda.JRI.REXP; | |
import org.rosuda.JRI.RVector; | |
import org.rosuda.JRI.Rengine; | |
public class RSample { | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.util.Base64; | |
import org.rosuda.JRI.Rengine; | |
public class RSample { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.util.Base64; | |
import org.rosuda.JRI.Rengine; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import java.awt.event.WindowAdapter; | |
import java.awt.event.WindowEvent; | |
import java.awt.image.BufferedImage; | |
import java.io.File; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.awt.Graphics; | |
import java.awt.event.WindowAdapter; | |
import java.awt.event.WindowEvent; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
import javax.swing.JFrame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rJava; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import org.rosuda.JRI.REXP; | |
public class RSample extends RBase implements KeyListener { | |
static int L = 30; | |
static int L2 = L * L; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS temp_table, drop_table; | |
CREATE TABLE temp_table LIKE target_table; | |
LOAD DATA INFILE "/path/to/csvfile.csv" INTO TABLE temp_table | |
FIELDS TERMINATED BY ',' ENCLOSED BY '"' | |
LINES STARTING BY '' TERMINATED BY '\n'; | |
RENAME TABLE target_table to drop_table, temp_table to target_table; | |
DROP TABLE drop_table; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- col1 主キー (csv 第1カラム) | |
-- col2 値 (csv 第2カラム) | |
-- col3 値 (csv 第3カラム) | |
-- col4 登録timestamp | |
-- col5 更新timestamp | |
-- 一時テーブルの作成 | |
DROP TABLE IF EXISTS tmp_table; | |
CREATE TABLE tmp_table LIKE target_table; | |
-- 一時テーブルの読込み |
OlderNewer