2 Replies Latest reply on Mar 9, 2015 4:37 PM by Christos Iraklis Tsatsoulis

    Weird behavior & error messages from ore.make.names (OREbase package)

    Christos Iraklis Tsatsoulis

      Hi all,

       

      I am getting some weird error messages when trying to use the ore.make.names function from the OREbase package. I will reproduce them here using the simple example from the function help page:

       

      > library(ORCH)

      > xnames <- c("col1", "Col.2", "COL_3", "col 4", "col1",

        "L_A_S_T C.O.L.U.M.N abcdefghijklmnopqrstuvwxyz")

      > ore.make.names(xnames)

      Error in ore.make.names(xnames) : attempt to apply non-function


      Accidentally (trying to confirm that other ORE/ORCH functions were working properly), I executed an ore.connect function, after which the ore.make.names indeed became functional:


      > ore.connect(type="HIVE")
      > ore.make.names(xnames)
      [1] "col1" 

      [2] "col_2" 

      [3] "col_3" 

      [4] "col_4" 

      [5] "col1_1" 

      [6] "l_a_s_t_c_o_l_u_m_n_abcdefghijklmnopqrstuvwxyz"


      Nevertheless, if I disconnect, I get again an error message, only a different one this time:


      > ore.disconnect()
      > ore.make.names(xnames)
      Error: '$' is not implemented yet'.ore.QueryEnv' is not implemented yet'makeDBnames' is not implemented yet


      Any ideas? Is this possibly a bug?


      Let me stress that there is nothing in the ore.make.names documentation to indicate that an ore.connect command is previously required. To my understanding, the function should behave much like the base R make.names function (except if there are different conversion rules for connections to Hive and Oracle database...)


      Thanks in advance


      Herc


      > sessionInfo()  # runs in Oracle BD Lite VM 4.0.1
      Oracle Distribution of R version 3.1.1 (--)

      Platform: x86_64-unknown-linux-gnu (64-bit)

       

      locale:

      [1] C

       

      attached base packages:

      [1] stats graphics grDevices utils datasets methods base 

       

      other attached packages:

      [1] ORCH_2.4.1 ORCHstats_2.4.1 ORCHcore_2.4.1 OREstats_1.4.1

      [5] MASS_7.3-33 OREbase_1.4.1 

       

      loaded via a namespace (and not attached):

      [1] tools_3.1.1