
R version 2.12.0 Under development (unstable) (2010-03-25 r51410)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library("foreign")
> otd <- read.octave("octave.dat")
> summary(otd)
                    Length Class  Mode     
a_string            2      -none- character
a_bool              1      -none- logical  
a_struct            3      -none- list     
a_cell              4      -none- list     
a_complex_scalar    1      -none- complex  
a_list              3      -none- list     
a_complex_matrix    4      -none- complex  
a_range             5      -none- numeric  
a_scalar            1      -none- numeric  
a_complex_3_d_array 8      -none- complex  
a_3_d_array         8      -none- numeric  
a_matrix            4      -none- numeric  
a_bool_matrix       4      -none- logical  
> str(otd)
List of 13
 $ a_string           : chr [1:2] "foo" "bar"
 $ a_bool             : logi FALSE
 $ a_struct           :List of 3
  ..$ a: num 1
  ..$ b: num [1:2, 1:2] 1 3 2 4
  ..$ c: chr "foo"
 $ a_cell             :List of 4
  ..$ : num 1
  ..$ : chr "foo"
  ..$ : num [1:2, 1:2] 1 3 2 4
  ..$ : chr "bar"
  ..- attr(*, "dim")= int [1:2] 2 2
 $ a_complex_scalar   : cplx 0+1i
 $ a_list             :List of 3
  ..$ : num 1
  ..$ : num [1:2, 1:2] 1 3 2 4
  ..$ : chr "foo"
 $ a_complex_matrix   : cplx [1:2, 1:2] 1+2i 5+0i 3-4i ...
 $ a_range            : num [1:5] 1 2 3 4 5
 $ a_scalar           : num 1
 $ a_complex_3_d_array: cplx [1:2, 1:2, 1:2] 1+1i 3+1i 2+1i ...
 $ a_3_d_array        : num [1:2, 1:2, 1:2] 1 3 2 4 5 7 6 8
 $ a_matrix           : num [1:2, 1:2] 1 3 2 4
 $ a_bool_matrix      : logi [1:2, 1:2] TRUE FALSE FALSE TRUE
> q()
