Ask Your Question

# Revision history [back]

### Reading table to vectors

I have a csv-file of the form

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A=c(11, 34, 3.29, ..., 34), B=c(22.33, 64, 1.150, ..., 123),...,E=c(23.43, 0.236, 24.9655, ..., 23.344)

### Reading table to vectors

I have a csv-file of the form

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A=c(11, A <- c(11, 34, 3.29, ..., 34), B=c(22.33, B <- c(22.33, 64, 1.150, ..., 123),...,E=c(23.43, 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344)

### Reading a table to vectors

I have a csv-file of the form

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A <- c(11, 34, 3.29, ..., 34), B <- c(22.33, 64, 1.150, ..., 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344)

### Reading a table to vectors

I have a csv-file of and I have read this in R code read.delim("file:///home/jaakko/Downloads/pcb.dat",header=T , dec = "," , sep = "\t")

This outputs the formdata like

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A <- c(11, 34, 3.29, ..., 34), B <- c(22.33, 64, 1.150, ..., 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344)

I'm not sure if R-code output can be used as sage-code input, do formatting by Python and then convert code back to R. Edit: Updated, the data was read by R code.

### Reading a table to vectors

I have a csv-file and I have read this in R code read.delim("file:///home/jaakko/Downloads/pcb.dat",header=T , dec = "," , sep = "\t")

This outputs the data like

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A <- c(11, 34, 3.29, ..., 34), B <- c(22.33, 64, 1.150, ..., 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344)

I'm not sure if R-code output can be used as sage-code input, do formatting by Python and then convert code back to R. Edit: Updated, the data was read by R code.R.

### Reading a table to vectors

I have a csv-file and I have read this in R code read.delim("file:///home/jaakko/Downloads/pcb.dat",header=T , dec = "," , sep = "\t")

This outputs the data like

      A     B      C      D        E
1    11    22.33 21.3   23.23  23.43
2    34     64   664    0.340  0.236
3    3.29  1.150 0.134  1.540  24.9655
...
69   34     123   23     12     23.344


Is there an easy way to split that data to vectors? Like A <- c(11, 34, 3.29, ..., 34), B <- c(22.33, 64, 1.150, ..., 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344)

I'm not sure if R-code output can be used as sage-code input, do formatting by Python and then convert code back to R.

Edit. Sorry, I forgot to say that I read the data as in R-mode.