/swish/pack/rserve_client/prolog/r/r_data.pl
All Application Manual Name SummaryHelp

  • prolog
    • r
      • r_call.pl -- R plugin for SWISH
      • r_serve.pl -- SWI-Prolog Rserve client
      • r_grammar.pl -- R parser primitives
      • r_term.pl -- Translate a Prolog term into an R expression
      • r_expand_dot.pl
      • r_data.pl -- R data frame handling
        • r_data_frame/3
        • r_data_frame_to_dicts/2
        • r_data_frame_to_rows/3
        • r_data_frame_from_dicts/2
        • r_data_frame_from_rows/2
        • r_data_frame_colnames/2
        • r_data_frame_rownames/2
      • r_sandbox.pl -- Declare the R API safe
 r_data_frame_to_rows(+DataFrame, +Functor, -Rows) is det
Translate a 2-dimensional R dataframe into a list of compound terms, each representing a row. The functor of each row is Functor. For example:
?- r_data_frame_to_rows(mtcars, car, Rows).
Rows = [ car(21.0, 6, 160.0, 110, 3.9, 2.62, 16.46, 0, 1, 4, 4),
         ...
       ].