Andrew Robinson
2023-Jul-25 22:12 UTC
[R] [EXT] Downloading a directory of text files into R
Hi Bob, there may be more efficient ways to go about it but I would use R to scrape the contents of http://home.brisnet.org.au/~bgreen/Data/Hanson1/ http://home.brisnet.org.au/~bgreen/Data/Hanson2/ in order to form the URLs of the files, and then loop over the URLs. Cheers, Andrew -- Andrew Robinson Chief Executive Officer, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC 3010 Australia Tel: (+61) 0403 138 955 Email: apro at unimelb.edu.au Website: https://researchers.ms.unimelb.edu.au/~apro at unimelb/ I acknowledge the Traditional Owners of the land I inhabit, and pay my respects to their Elders. On 26 Jul 2023 at 8:07 AM +1000, Bob Green <bgreen at dyson.brisnet.org.au>, wrote: External email: Please exercise caution Hello, I am seeking advice as to how I can download the 833 files from this site:"http://home.brisnet.org.au/~bgreen/Data" I want to be able to download them to perform a textual analysis. If the 833 files, which are in a Directory with two subfolders were on my computer I could read them through readtext. Using readtext I get the error:> x = readtext("http://home.brisnet.org.au/~bgreen/Data/*")Error in download_remote(file, ignore_missing, cache, verbosity) : Remote URL does not end in known extension. Please download the file manually.> x = readtext("http://home.brisnet.org.au/~bgreen/Data/Dir/()")Error in download_remote(file, ignore_missing, cache, verbosity) : Remote URL does not end in known extension. Please download the file manually. Any suggestions are appreciated. Bob ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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. [[alternative HTML version deleted]]