Forecasts              package:fImport              R Documentation

_I_m_p_o_r_t _M_a_r_k_e_t _D_a_t_a _f_r_o_m _w_w_w._f_o_r_e_c_a_s_t_s._o_r_g

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

     A collection and description of functions to import  financial and
     economic market data from the www.forecast.org web site. 

     The functions are:

       'forecastsImport'  monthly data from the Financial Forecast Center,
       'forecastsSeries'  easy to use download from Financial Forecast Center.

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

     forecastsImport(query, file = "tempfile", 
         source = "http://www.forecasts.org/data/data/", save = FALSE, 
         try = TRUE) 
           
     forecastsSeries(query, returnClass = c("timeSeries", "ts", "matrix", 
         "data.frame"), getReturns = FALSE, ...)    
         

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

getReturns: a logical flag. Should return values be computed using the 
          function 'returnSeries'? 

    file: a character string with filename, usually having extension
          ".csv", where to save the downloaded data. 

   query: a character string, denoting the location of the data at the 
          web site. 

returnClass: a character string naming the class of the object to be 
          returned. By default the function returns  a '"timeSeries"'
          object, alternatives are: '"ts"',  '"matrix"', or
          '"data.frame"'. 

    save: a logical value, if set to TRUE the downloaded data file will
           be stored under the path and file name specified by the
          string 'file'. By default FALSE. 

  source: a character string with the download URL. 

     try: a logical value, if set to TRUE the Internet access will be
          checked. 

     ...: optional arguments to be passed. 

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

     The function 'forecastsImport' returns an S4 object of class 
     'fWEBDATA' with the following slots:

   @call: the function call.   

   @data: the data as downloaded formatted as a data.frame. 

  @param: a character vector whose elements contain the values of
          selected  parameters of the argument list. 

  @title: a character string with the name of the download. This can be
           overwritten specifying a user defined input argument. 

@description: a character string with an optional user defined
          description.  By default just the current date when the test
          was applied will be returned.


     The function 'forecastsSeries' returns an S4 object of  class 
     'timeSeries' or alternatively an object specified by the function
     argument 'returnClass'. 

_N_o_t_e:

     *Internet Download Functions:* 

      IMPORTANT NOTE: If the service provider changes the data file
     format  it may become necessary to modify and update the
     functions.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## Not run: 
     ## forecastsImport -
        NA
     ## End(Not run)

