How to download a txt file in RStudio

How do I download a txt data file into R. What command do I use?

If you're using RStudio, there are some clever built-in tools that ease the process:

Otherwise, in base R you have the read.table family of functions, and in the tidyverse there's the awesome readr package.

(I'm assuming you're reading in something rectangular... if not, then I'd start with readr. It mostly wraps base R functions for reading in arbitrary text, but I find its interface nicer to use and the documentation more pleasant to read)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.