R read.table Error in file : invalid ‘description’ argument (2 Examples)

This tutorial illustrates how to deal with the “Error in file(file, “rt”) : invalid ‘description’ argument” in the R programming language.

Example 1: Replicating the Error Message in file(file, “rt”) : invalid ‘description’ argument

read.table(paste0(c("name1", "name2"), ".csv"))     # Multiple file names don't work
# Error in file(file, "rt") : invalid 'description' argument

Example 2: Solving the Error Message in file(file, “rt”) : invalid ‘description’ argument

read.table(paste0(c("name1", "name2")[1], ".csv"))  # Single file name works

Related Articles & Further Resources

Furthermore, you could have a look at some of the related articles on this homepage:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top