# using the pop-up selection menu
rg <- importTxt()
# supposing that the data file sample.txt is in the current directory
file <- "sample.txt"
rg <- importTxt(file)
# specifying a directory (arbitrary example directory)
dir <- "/Users/markheckmann/data"
rg <- importTxt(file, dir)
# using a full path
rg <- importTxt("/Users/markheckmann/data/sample.txt")
# load .txt data from URL
rg <- importTxt("http://www.openrepgrid.uni-bremen.de/data/sample.txt")
# importing more than one .txt file via R code
files <- c("sample.txt", "sample_2.txt")
rg <- importTxt(files)
Run the code above in your browser using DataLab