Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_vpts(): support reading remote files #420

Open
peterdesmet opened this issue Feb 10, 2021 · 1 comment
Open

read_vpts(): support reading remote files #420

peterdesmet opened this issue Feb 10, 2021 · 1 comment
Labels
enhancement VPTS CSV Related to VPTS CSV format
Milestone

Comments

@peterdesmet
Copy link
Collaborator

read_vpts() only supports reading local files, not files from URL:

> read_vpts("https://opendata.meteo.be/ftp/observations/radar/vbird/bewid/2020/bewid_vpts_20201014.txt")
Error in read_vpts("https://opendata.meteo.be/ftp/observations/radar/vbird/bewid/2020/bewid_vpts_20201014.txt") : 
  File https://opendata.meteo.be/ftp/observations/radar/vbird/bewid/2020/bewid_vpts_20201014.txt doesn't exist.

This is caused by the file.exists() check in the function, which returns FALSE for URLs:

bioRad/R/read_vpts.R

Lines 26 to 28 in 33ec6ed

if (!file.exists(file)) {
stop(paste("File", file, "doesn't exist."))
}

How could this check be adapted to support reading remote files from URL?

@bart1
Copy link
Collaborator

bart1 commented Feb 10, 2021

Sometimes it it worth to make things work based on connections, it also allow to work easily with compressed files which I guess is worth for the vpts txt files

@adokter adokter added this to the 0.7.0 milestone Jun 7, 2021
@adokter adokter modified the milestones: 1.0.0, 1.1.0 Aug 31, 2022
@peterdesmet peterdesmet added the VPTS CSV Related to VPTS CSV format label Mar 10, 2023
@peterdesmet peterdesmet changed the title read_vpts(): support download from URL read_vpts(): support reading remote files May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement VPTS CSV Related to VPTS CSV format
Projects
None yet
Development

No branches or pull requests

3 participants