loadFromUrl           package:Resourcerer           R Documentation

_F_u_n_c_t_i_o_n_s _t_o _l_o_a_d _f_i_l_e_s _f_r_o_m _a _w_e_b _s_i_t_e

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

     Given an url, these functions download a file from a given web
     site and unzip the file if it is compressed.

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

     loadFromUrl(srcUrl, destDir = "", verbose=FALSE)
     validateUrl(srcUrl)
     unzipFile(fileName, where = file.path(.path.package("Resourcerer"),
     "temp"), isgz = FALSE)

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

  srcUrl: 'srcUrl' a character string for the url of the file to be
          downloaded

 destDir: 'destDir' a character string for a loacal directory where the
          file to be downloaded will be saved

   where: 'where' same as destDir

    isgz: 'isga' a boolean indicating whether the downloaded file is a
          gz file

fileName: 'fileName' a character string for the name of a file

 verbose: A booline indicating whether to print extra information.

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

     These functions used to be part of the AnnBuilder package which
     was replaced by AnnotationDbi.If the file is compressed,
     decompressing will be applied and the path for the decompressed
     file will be returned.

     'validateUrl' will terminate the process if an invalid url is
     passed.

     'unzipFile' decompress the file passed as fileName.

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

     'loadFromUrl' returns a character string for the name of the file
     saved locally.

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

     Jianhua Zhang

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

     ## Not run: 
     # Get a dummy data file from Bioconductor web site
     data <-
     loadFromUrl("http://www.bioconductor.org/datafiles/wwwsources/Tll_tmpl.gz",
     destDir = "")
     unlink(data)
     ## End(Not run)

