Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sckott/ftp
ftp for R
https://github.com/sckott/ftp
ftp ftp-client r r-package rstats
Last synced: about 20 hours ago
JSON representation
ftp for R
- Host: GitHub
- URL: https://github.com/sckott/ftp
- Owner: sckott
- License: other
- Created: 2015-02-13T19:39:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T19:14:12.000Z (about 4 years ago)
- Last Synced: 2024-11-01T21:51:02.482Z (8 days ago)
- Topics: ftp, ftp-client, r, r-package, rstats
- Language: R
- Homepage:
- Size: 217 KB
- Stars: 28
- Watchers: 6
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - sckott/ftp - ftp for R (R)
README
ftp
===```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```[![Build Status](https://travis-ci.org/sckott/ftp.svg?branch=master)](https://travis-ci.org/sckott/ftp)
An FTP client for R
**not quite ready to use yet**
The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files from a server to a client using the Client–server model on a computer network.
See the ftp info vignette for detailed FTP information.
## Installation
```{r eval=FALSE}
remotes::install_github("sckott/ftp")
``````{r}
library('ftp')
```## list files
```{r eval=FALSE}
ftp_list("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/")
ftp_list("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/")
ftp_list("ftp://ftp.ncdc.noaa.gov/pub/data/noaa/2014/")
# just list files
ftp_list("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/", just_list = TRUE)
```## fetch files
```{r eval=FALSE}
url <- "ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/1882.csv.gz"
file <- tempfile(fileext = ".csv.gz")
ftp_fetch(url, disk = file)
utils::read.delim(file, sep = ",", nrows = 10, header = FALSE)
unlink(file) # cleanup
```## ftp client
Wraps an R6 method `FTPClient`
```{r}
(x <- ftp_client("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/"))
```adjust settings
```{r eval=FALSE}
x$ftp_port()
x$set_pasv()
```pwd, working directory
```{r}
x$pwd()
```list files
```{r}
x$list()
```> note that parsing isn't working totally yet :)
## Meta
* Please [report any issues or bugs](https://github.com/sckott/ftp/issues).
* License: MIT
* Get citation information for `ftp` in R doing `citation(package = 'ftp')`
* Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.