Re: [R] ftp connections for uploading files
On Fri, 9 Jan 2009, Duncan Temple Lang wrote: Hi Thomas Rather than getting into the details of libcurl options which are quite general and very flexible, I thought it was easier to write an explicit ftpUpload() function that takes care of the details. You need a new version of the package (as it contains the function and a small change to the C code), but I don't have the time to build the Windows version for the next few days. One is on CRANextras now. The function can be used as ftpUpload(path/to/file, ftp://server/path/to/target/file;, userpwd = login:password) and you can deal with contents in memory too rather than from a file. HTH, D. Thomas Loridan wrote: Thanks a lot Duncan Sorry to insist with my questions but I am very lost with these Rcurl commands... could you point out the few ones I need to set up an ftp connection and just upload a file ? Greatly appreciated Thomas 2009/1/8 Duncan Temple Lang dun...@wald.ucdavis.edu: Prof Brian Ripley wrote: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). It does support FTP, and all of the protocols that are supported in the installed libcurl, so it depends the configuration options for libcurl itself. The protocols it handles can be found via the curlVersion() function, e.g. curlVersion() $age [1] 3 $version [1] 7.16.3 $vesion_num [1] 462851 $host [1] powerpc-apple-darwin9.0 $features ipv6 ssl libz ntlm gssnegotiate largefile 148 16 32 512 $ssl_version [1] OpenSSL/0.9.7l $ssl_version_num [1] 0 $libz_version [1] 1.2.3 $protocols [1] tftp ftptelnet dict ldap http file https [9] ftps $ares [1] $ares_num [1] 0 $libidn [1] sessionInfo() R version 2.9.0 Under development (unstable) (2008-09-27 r46576) i386-apple-darwin9.5.0 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] ROOXML_0.1-0Rcompression_0.4-0 RGoogleDocs_0.2-0 [4] SVGAnnotation_0.1-0 lattice_0.17-15 RCurl_0.92-0 [7] XML_1.99-0 RTools_0.1-0bitops_1.0-4 loaded via a namespace (and not attached): [1] grid_2.9.0 From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
Thanks a lot Duncan Sorry to insist with my questions but I am very lost with these Rcurl commands... could you point out the few ones I need to set up an ftp connection and just upload a file ? Greatly appreciated Thomas 2009/1/8 Duncan Temple Lang dun...@wald.ucdavis.edu: Prof Brian Ripley wrote: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). It does support FTP, and all of the protocols that are supported in the installed libcurl, so it depends the configuration options for libcurl itself. The protocols it handles can be found via the curlVersion() function, e.g. curlVersion() $age [1] 3 $version [1] 7.16.3 $vesion_num [1] 462851 $host [1] powerpc-apple-darwin9.0 $features ipv6 ssl libz ntlm gssnegotiate largefile 148 16 32 512 $ssl_version [1] OpenSSL/0.9.7l $ssl_version_num [1] 0 $libz_version [1] 1.2.3 $protocols [1] tftp ftptelnet dict ldap http file https [9] ftps $ares [1] $ares_num [1] 0 $libidn [1] sessionInfo() R version 2.9.0 Under development (unstable) (2008-09-27 r46576) i386-apple-darwin9.5.0 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] ROOXML_0.1-0Rcompression_0.4-0 RGoogleDocs_0.2-0 [4] SVGAnnotation_0.1-0 lattice_0.17-15 RCurl_0.92-0 [7] XML_1.99-0 RTools_0.1-0bitops_1.0-4 loaded via a namespace (and not attached): [1] grid_2.9.0 From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
Hi Thomas Rather than getting into the details of libcurl options which are quite general and very flexible, I thought it was easier to write an explicit ftpUpload() function that takes care of the details. You need a new version of the package (as it contains the function and a small change to the C code), but I don't have the time to build the Windows version for the next few days. The function can be used as ftpUpload(path/to/file, ftp://server/path/to/target/file;, userpwd = login:password) and you can deal with contents in memory too rather than from a file. HTH, D. Thomas Loridan wrote: Thanks a lot Duncan Sorry to insist with my questions but I am very lost with these Rcurl commands... could you point out the few ones I need to set up an ftp connection and just upload a file ? Greatly appreciated Thomas 2009/1/8 Duncan Temple Lang dun...@wald.ucdavis.edu: Prof Brian Ripley wrote: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). It does support FTP, and all of the protocols that are supported in the installed libcurl, so it depends the configuration options for libcurl itself. The protocols it handles can be found via the curlVersion() function, e.g. curlVersion() $age [1] 3 $version [1] 7.16.3 $vesion_num [1] 462851 $host [1] powerpc-apple-darwin9.0 $features ipv6 ssl libz ntlm gssnegotiate largefile 148 16 32 512 $ssl_version [1] OpenSSL/0.9.7l $ssl_version_num [1] 0 $libz_version [1] 1.2.3 $protocols [1] tftp ftptelnet dict ldap http file https [9] ftps $ares [1] $ares_num [1] 0 $libidn [1] sessionInfo() R version 2.9.0 Under development (unstable) (2008-09-27 r46576) i386-apple-darwin9.5.0 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] ROOXML_0.1-0Rcompression_0.4-0 RGoogleDocs_0.2-0 [4] SVGAnnotation_0.1-0 lattice_0.17-15 RCurl_0.92-0 [7] XML_1.99-0 RTools_0.1-0bitops_1.0-4 loaded via a namespace (and not attached): [1] grid_2.9.0 From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] ftp connections for uploading files
Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
Many thanks for that. I am running R under windows and I am not sure what you mean by this curl? Is'nt there a way to ftp via an intrinsic R function? Thanks again Thomas 2009/1/8 Prof Brian Ripley rip...@stats.ox.ac.uk: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] ftp connections for uploading files
Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
On Thu, Jan 8, 2009 at 5:42 PM, Thomas Loridan thomas.lori...@gmail.com wrote: Many thanks for that. I am running R under windows and I am not sure what you mean by this curl? http://curl.haxx.se/ Is'nt there a way to ftp via an intrinsic R function? That I don't know, perhaps some else does. You might want to double check the RCurl package. Gabor Thanks again Thomas 2009/1/8 Prof Brian Ripley rip...@stats.ox.ac.uk: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Gabor Csardi gabor.csa...@unil.ch UNIL DGM __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
On Thu, 8 Jan 2009, Gábor Csárdi wrote: On Thu, Jan 8, 2009 at 5:42 PM, Thomas Loridan thomas.lori...@gmail.com wrote: Many thanks for that. I am running R under windows and I am not sure what you mean by this curl? http://curl.haxx.se/ And it comes as standard on Mac OS X and many Linux distros. (Generally people who fail to provide the requested information should expect to Google for themselves, not expect their helpers to do such basic research for them.) Is'nt there a way to ftp via an intrinsic R function? That I don't know, perhaps some else does. You might want to double check the RCurl package. Yes, I do know about 'intrinsic R', and did you think the author of the R Internet connectivity would not have said so if there was? (Also the person who provides the RCurl port for Windows.) Gabor Thanks again Thomas 2009/1/8 Prof Brian Ripley rip...@stats.ox.ac.uk: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ftp connections for uploading files
Prof Brian Ripley wrote: Try system() with curl or a decent ftp client (I don't see that package RCurl covers this, but it might despite its description only mentioning HTTP). It does support FTP, and all of the protocols that are supported in the installed libcurl, so it depends the configuration options for libcurl itself. The protocols it handles can be found via the curlVersion() function, e.g. curlVersion() $age [1] 3 $version [1] 7.16.3 $vesion_num [1] 462851 $host [1] powerpc-apple-darwin9.0 $features ipv6 ssl libz ntlm gssnegotiate largefile 148 16 32 512 $ssl_version [1] OpenSSL/0.9.7l $ssl_version_num [1] 0 $libz_version [1] 1.2.3 $protocols [1] tftp ftptelnet dict ldap http file https [9] ftps $ares [1] $ares_num [1] 0 $libidn [1] sessionInfo() R version 2.9.0 Under development (unstable) (2008-09-27 r46576) i386-apple-darwin9.5.0 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] ROOXML_0.1-0Rcompression_0.4-0 RGoogleDocs_0.2-0 [4] SVGAnnotation_0.1-0 lattice_0.17-15 RCurl_0.92-0 [7] XML_1.99-0 RTools_0.1-0bitops_1.0-4 loaded via a namespace (and not attached): [1] grid_2.9.0 From 'man curl' curl offers a busload of useful tricks like proxy support, user authen- tication, ftp upload, HTTP post, SSL connections, cookies, file trans- fer resume and more. As you will see below, the amount of features will make your head spin! Ftp protocols (and there are more than one) are fiendishly complicated, especially if proxies are involved. BTW, this is yet another case where knowing your OS would have helped give a more precise answer. See the posting guide. On Thu, 8 Jan 2009, Thomas Loridan wrote: Hi all, I would like to upload some plots I create wth R via ftp or something similar but I don t really understand which command/syntax I should use: should I go for make.socket + write.socket or try and create environment variables like frp_proxy_user and then ftp my files? how? many thanks for your help Thomas -- Thomas Loridan King's College email: thomas.lori...@kcl.ac.uk webpage:http://geography.kcl.ac.uk/micromet/tloridan/index.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.