http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.11_2014.12.04.zip
These additions to .split() and .join() allow quick conversion of arrays
and strings to and from tab-separated and CSV data.
In addition, any column of a two-dimensional array can be extracted now
using the .col(n) function
Jmol.___JmolVersion="14.3.11_2014.12.04"
new feature: "....".split("",true) // CSV split of string to array of arrays
new feature: [...].split("",true) // CSV split of array to array of arrays
new feature: "...".split("\t",true) // tab split of string to array of
arrays
new feature: [...].split("\t",true) // tab split of array to array of arrays
new feature: [...][...].join("",true) // CSV join to array of lines
new feature: [...][...].join("\t",true) // tab join to array of lines
-- example:
x = load("test.csv").split("",true) //from CSV
print x.join("",true) // back to CSV
print x.join("\t",true) // to tab-separated
new feature: [...][...].col(n)
-- extracts nth column from an array of arrays
-- example:
x = load("test.csv").split("",true).col(3) //3rd column from CSV
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users