public boolean save(File file, String options) throws IOException { return save(PApplet.createOutput(file), Table.extensionOptions(false, file.getName(), options)); }
public boolean save(File file, String options) throws IOException { return save(PApplet.createOutput(file), Table.extensionOptions(false, file.getName(), options)); }
protected DataSource loadTableNoDict(String filename, String options, String missingStr) { String optionStr = Table.extensionOptions(true, filename, options); return DataFactory.guessedParse(createInput(filename), codebook, optionStr, missingStr); }
/** * version that uses a File object; future releases (or data types) * may include additional optimizations here * * @nowebref */ public Table(File file, String options) throws IOException { // uses createInput() to handle .gz (and eventually .bz2) files init(); parse(PApplet.createInput(file), extensionOptions(true, file.getName(), options)); }
/** * version that uses a File object; future releases (or data types) * may include additional optimizations here * * @nowebref */ public Table(File file, String options) throws IOException { // uses createInput() to handle .gz (and eventually .bz2) files init(); parse(PApplet.createInput(file), extensionOptions(true, file.getName(), options)); }
protected DataDict loadDict(String filename) { try { String optionStr = Table.extensionOptions(true, filename, null); return DataFactory.createDict(createInput(filename), optionStr); } catch (IOException e) { Log.error("Cannot load dictionary file", e); return null; } }
protected DataSource loadTable(String filename, String options) { try { String optionStr = Table.extensionOptions(true, filename, options); String[] optionList = splitOptions(optionStr); DataDict dictionary = null; for (String opt : optionList) { if (opt.startsWith("dictionary=")) { dictionary = DataFactory.createDict(createInput(opt.substring(opt.indexOf('=') + 1)), "tsv"); return dictionary.typedSource(createInput(filename), optionStr); } } return DataFactory.createSource(createInput(filename), optionStr); } catch (IOException e) { e.printStackTrace(); return null; } }
protected DataSource loadTable(String filename, String options, String missingStr) { try { String optionStr = Table.extensionOptions(true, filename, options); String[] optionList = splitOptions(optionStr); DataDict dict = null; for (String opt : optionList) { if (opt.startsWith("dictionary=")) { dict = loadDict(opt.substring(opt.indexOf('=') + 1)); return dict.typedSource(createInput(filename), dict, optionStr, missingStr); } } return DataFactory.createSource(createInput(filename), optionStr); } catch (IOException e) { Log.error("Cannot load data file", e); return null; } }
String optionStr = Table.extensionOptions(true, filename, options); String[] optionList = trim(split(optionStr, ','));