R में Scalable Data Processing
Simon Urbanek
Member of R-Core, Lead Inventive Scientist, AT&T Labs Research
जब तक सारा डेटा प्रोसेस न हो जाए, 1 से 3 दोहराएँ
iotools पैकेज में, बेहतर लचीलापन और परफॉर्मेंस के लिए डेटा का भौतिक लोडिंग और उसे R ऑब्जेक्ट्स में पार्स करना अलग-अलग किया गया है.
readAsRaw() पूरा डेटा एक raw वेक्टर में पढ़ता हैread.chunk() डेटा को चंक्स में raw वेक्टर में पढ़ता हैmstrsplit() raw डेटा को एक मैट्रिक्स में बदलता हैdstrsplit() raw डेटा को एक data frame में बदलता हैread.delim.raw() = readAsRaw() + dstrsplit()
# Open a file connection
fc <- file("data-file.csv", "rb")
# Read the first line if the data has a header
readLines(fc, n = 1)
....
# Code to import and parse the data
....
# Close the file connection
close(fc)
R में Scalable Data Processing