Engine.FILE_TYPE, Engine.HIST_TYPES, Engine.PLOT_TYPES, Engine.VAR_TYPES
Modifier and Type | Field and Description |
---|---|
static org.rosuda.javaGD.JGDBufferedPanel |
jgdBuffPanel
Variable for JavaGD canvas
|
Constructor and Description |
---|
R_engine()
Create and initialize R engine.
|
Modifier and Type | Method and Description |
---|---|
boolean |
convertVariable(java.lang.String colName,
Engine.VAR_TYPES convert)
Convert type of column to different type of column
|
void |
createBarPlot(Engine.PLOT_TYPES type,
java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
java.lang.String... colNames)
Draw bar plot for specific columns with specific title and labels.
|
void |
createBoxPlot(java.lang.String title,
java.lang.String... colNames)
Draw box plot for specific columns with specific title.
|
boolean |
createHistogram(Engine.PLOT_TYPES type,
java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
java.lang.String colName)
Draw histogram for specific numeric column.
|
void |
createPiePlot(Engine.PLOT_TYPES type,
java.lang.String title,
java.lang.String colName)
Draw pie plot for specific column with specific title.
|
java.lang.String[] |
getCategories(java.lang.String colName)
Return name of categories after categorize.
|
Table |
getContingencyTable(java.lang.String colName1,
java.lang.String colName2)
Create and return contingency table for variable Z(X, Y)
|
java.lang.String[] |
getDefaultCategories(java.lang.String colName)
Return name of categories before categorized.
|
Table |
getFrequencyTable(java.lang.String colName)
Create and return frequency table for categoric variable.
|
Table |
getCharacteristicTable(java.lang.String... cols)
Create and return table with description statistic values.
|
javax.swing.JPanel |
getPlotGraphPanel()
Return instance of JPanel with plot.
|
Table |
getQuantileTable(java.lang.String... cols)
Create and return quantile table for numeric variables.
|
Table |
getTable()
Create and return table from imported data
|
Table |
getTable(java.lang.String[] columnNames)
Create and return table with specific columns from imported data
|
void |
histogram(java.lang.String colName,
java.lang.Integer breaks,
Engine.HIST_TYPES type)
Create histogram for specific column, but not plot it.
|
void |
changeCategoriesNames(java.lang.String[] values,
java.lang.String colName)
Change names of categories for specific category column
|
ChisqTest |
chisqDependencyTest()
Compute and create report of Pearson's Chi-squared Test,
for testing independency
|
boolean |
loadTable(java.lang.String filePath,
Engine.FILE_TYPE fileType)
Import table of data
|
void |
savePlots(java.lang.String filePath,
int width,
int height)
Export plots to specific path with specific size
|
void |
setColors(java.lang.String[] colors)
Set specific colors to plots
|
void |
setNAValue(java.lang.String value,
java.lang.String colName)
Set missing values to specific column
|
void |
setPlotGraphPanel(javax.swing.JPanel plotGraphPanel)
Set instance of JPanel with plot.
|
public static org.rosuda.javaGD.JGDBufferedPanel jgdBuffPanel
public R_engine() throws java.lang.Exception
java.lang.Exception
- - exception for fail R loadpublic void histogram(java.lang.String colName, java.lang.Integer breaks, Engine.HIST_TYPES type)
Engine
histogram
in interface Engine
colName
- String - names of columnbreaks
- Integer - number of breakstype
- Engine.HIST_TYPES
- histogram typepublic void createBoxPlot(java.lang.String title, java.lang.String... colNames)
Engine
createBoxPlot
in interface Engine
title
- String - title of plotcolNames
- String - names of columnspublic void createBarPlot(Engine.PLOT_TYPES type, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, java.lang.String... colNames)
Engine
createBarPlot
in interface Engine
type
- Engine.PLOT_TYPES
- represent type of plottitle
- String - title of plotxLabel
- String - label of x axeyLabel
- String - label of y axecolNames
- String - names of columnspublic boolean createHistogram(Engine.PLOT_TYPES type, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, java.lang.String colName)
Engine
createHistogram
in interface Engine
type
- Engine.PLOT_TYPES
- types of plotstitle
- String - title of plotxLabel
- String - label of x axeyLabel
- String - label of y axecolName
- String - names of columnpublic void createPiePlot(Engine.PLOT_TYPES type, java.lang.String title, java.lang.String colName)
Engine
createPiePlot
in interface Engine
type
- Engine.PLOT_TYPES
- represent type of plottitle
- String - title of plotcolName
- String - name of specific columnpublic java.lang.String[] getDefaultCategories(java.lang.String colName)
Engine
getDefaultCategories
in interface Engine
colName
- String - names of columnpublic java.lang.String[] getCategories(java.lang.String colName)
Engine
getCategories
in interface Engine
colName
- - name of columnpublic Table getTable()
Engine
public Table getTable(java.lang.String[] columnNames)
Engine
public void changeCategoriesNames(java.lang.String[] values, java.lang.String colName)
Engine
changeCategoriesNames
in interface Engine
values
- String - names of categoriescolName
- String - name of columnpublic boolean loadTable(java.lang.String filePath, Engine.FILE_TYPE fileType)
Engine
loadTable
in interface Engine
filePath
- String - location of imported filefileType
- Engine.FILE_TYPE
- type of filepublic void savePlots(java.lang.String filePath, int width, int height)
Engine
public void setColors(java.lang.String[] colors)
Engine
public void setNAValue(java.lang.String value, java.lang.String colName)
Engine
setNAValue
in interface Engine
value
- String - category to set as missingcolName
- String - name of columnpublic boolean convertVariable(java.lang.String colName, Engine.VAR_TYPES convert)
Engine
convertVariable
in interface Engine
colName
- String - name of columnconvert
- Engine.VAR_TYPES
- type to convertpublic javax.swing.JPanel getPlotGraphPanel()
Engine
getPlotGraphPanel
in interface Engine
public void setPlotGraphPanel(javax.swing.JPanel plotGraphPanel)
Engine
setPlotGraphPanel
in interface Engine
plotGraphPanel
- JPanelpublic Table getContingencyTable(java.lang.String colName1, java.lang.String colName2)
Engine
getContingencyTable
in interface Engine
colName1
- String - name of X variablecolName2
- String - name of Y variableTable
- contingency tablepublic ChisqTest chisqDependencyTest()
Engine
chisqDependencyTest
in interface Engine
ChisqTest
public Table getCharacteristicTable(java.lang.String... cols)
Engine
getCharacteristicTable
in interface Engine
cols
- String - name of specific columnsTable
- characteristic tablepublic Table getFrequencyTable(java.lang.String colName)
Engine
getFrequencyTable
in interface Engine
colName
- String - name of specific columnTable
- frequency tablepublic Table getQuantileTable(java.lang.String... cols)
Engine
getQuantileTable
in interface Engine
cols
- String - name of specific columnsTable
- quantile table