R function read.DIF() and read.table()
Used to import data. read.DIF() for Windows machines, read.table() for Macs. Can use with clipboard and assign to data frame as a way to import. variableName <- read.DIF("clipboard", transpose=TRUE) variableName <- read.table(pipe("pbpaste"))
We need some way to import data from files. We'll also need ways to import from http GET but we'll do that under a different issue.
If the file is a csv file then we should import into an Array of Maps (look at the "table" for the book assignment).
So, if the user specifies $myTable = read.table('mydata.csv') and mydata.csv contains:
"column1", "column2", "column3"
1, "my name", true
10, "another name", false
Then we want it to come in as an Array of Maps
$myTable = [
{column1: 1, column2: "my name", column3: true},
{column1: 10, column2: "another name", column3: false}
]
Let's use node module csv.