sdfSelect              package:SQLiteDF              R Documentation

_D_i_r_e_c_t_l_y _Q_u_e_r_y _a_n _S_Q_L_i_t_e _D_a_t_a _F_r_a_m_e

_D_e_s_c_r_i_p_t_i_o_n:

     Directly query an SQLite Data Frame using a SELECT statement.

_U_s_a_g_e:

     sdfSelect(sdf, select = NULL, where = NULL, limit = NULL, debug = FALSE)

_A_r_g_u_m_e_n_t_s:

     sdf: the sqlite.data.frame 

  select: content of the SELECT clause. If NULL, then "*" is assumed 

   where: content of the WHERE clause. If NULL, then an empty  WHERE
          clause is assumed 

   limit: content of the LIMIT clause. This limits the rows returned 

   debug: if true, prints the SQL statement issued to SQLite 

_D_e_t_a_i_l_s:

     Issues a SELECT statement to the corresponding data table of the
     passed SDF. It forms the actual SELECT statement from the
     fragments supplied as arguments.  This insulates the user from the
     underlying naming conventions and database organization used by
     the package. To do more sophisticated queries, please use RSQLite
     and open the databases in the '.SQLiteDF' directory under your
     working directory.

     Use square brackets to quote column names that are not valid SQL
     object names. E.g. to select the Petal.Length column of a SDF copy
     of dataset iris, use [Petal.Length].

     The limit clause is a way to restrict the results of a query. Note
     that the limiting operation is done after the resultset has been
     determined, and in no way can effect any computation in the select
     clause. E.g. 'select  count(*) from sdf_data limit 4,10' will not
     return 10. It will return an empty set since the result of the
     SELECT statement without the LIMIT clause is a single row, and the
     LIMIT clause takes 10 rows starting from the 5th row in the result
     set.

_V_a_l_u_e:

     Returns NULL if the query does not return any row, a vector of the
      appropriate class (for factors) if there is only one column
     selected, or a data frame if there are more than one columns.

_A_u_t_h_o_r(_s):

     Miguel A. R. Manese

_R_e_f_e_r_e_n_c_e_s:

     ~put references to the literature/web site here ~

_E_x_a_m_p_l_e_s:

         iris.sdf <- sqlite.data.frame(iris)
         sdfSelect(iris.sdf, "[Petal.Length]", "[Petal.Length]>3")
         sdfSelect(iris.sdf, where="[Petal.Length]>3", limit="9,5")
         sdfSelect(iris.sdf, where="Species=3")

