getHdata                package:Hmisc                R Documentation

_D_o_w_n_l_o_a_d _a_n_d _I_n_s_t_a_l_l _D_a_t_a_s_e_t_s _f_o_r _H_m_i_s_c, _D_e_s_i_g_n, _a_n_d _S_t_a_t_i_s_t_i_c_a_l
_M_o_d_e_l_i_n_g

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

     This function downloads and makes ready to use datasets from the
     main web site for the Hmisc and Design libraries.  For R, the
     datasets were stored in compressed 'save' format and 'getHdata'
     makes them available by running 'load()' after download.  For
     S-Plus, the datasets were stored in 'data.dump' format and are
     made available by running 'data.restore()' after import.  The
     dataset is run through the 'cleanup.import' function to reduce
     multiple inheritance problems for SV4 (S-Plus 5 or later). 
     Calling 'getHdata' with no 'file' argument provides a character
     vector of names of available datasets that are currently on the
     web site.  For R, R's default browser can optionally be launched
     to view 'html' files that were already prepared using the Hmisc
     command 'html(contents( ))' or to view '.txt' or '.html' data
     description files when available.

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

     getHdata(file, what = c("data", "contents", "description", "all"),
              where="http://biostat.mc.vanderbilt.edu/twiki/pub/Main/DataSets")

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

    file: an unquoted name of a dataset on the web site, e.g.
          'prostate'.  Omit 'file' to obtain a list of available
          datasets.

    what: specify 'what="contents"' to browse the contents (metadata)
          for the dataset rather than fetching the data themselves. 
          Specify 'what="description"' to browse a data description
          file if available.  Specify 'what="all"' to retrieve the data
          and see the metadata and description.

   where: URL containing the data and metadata files

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

     For S-Plus, Hmisc defines a function 'download.file' that is used
     by 'getHdata'.  This is a stripped-down version of the R
     'download.file' function that uses the system 'wget' executable
     for fetching files from the Internet.  For Unix and Linux systems,
     'wget' will be pre-installed usually.  For windows S-Plus systems,
     get 'wget' from <URL: ftp://sunsite.dk/projects/wget/windows>. 
     Once you unzip the file from there, move 'wget.exe' to the same
     Windows directory that contains 'ftp.exe'.

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

     'getHdata()' without a 'file' argument returns a character vector
     of dataset base names.  When a dataset is downloaded, the data
     frame is placed in search position one and is not returned as
     value of 'getHdata'.

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

     Frank Harrell

_S_e_e _A_l_s_o:

     'download.file', 'cleanup.import', 'data.restore', 'load'

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

     ## Not run: 
     getHdata()          # download list of available datasets
     getHdata(prostate)  # downloads, load( ) or data.restore( )
                         # runs cleanup.import for S-Plus 6
     getHdata(valung, "contents")   # open browser (options(browser="whatever"))
                         # after downloading valung.html
                         # (result of html(contents()))
     getHdata(support, "all")  # download and open one browser window
     datadensity(support)
     attach(support)     # make individual variables available
     getHdata(plasma,  "all")  # download and open two browser windows
                               # (description file is available for plasma)
     ## End(Not run)

