Inputting a file in R without setwd()

253 Views Asked by At

I'm trying to input a text file into R using grep and using setwd() (I can use other methods, I'm not sure what, I'm only starting to learn R).

I'm writing a json template for a third-party server that runs a docker image as an env but currently there is a bug that can't change the working directory. Is there another way to get this file?

1

There are 1 best solutions below

0
On

If you're trying to do something like this:

setwd('/tmp')
read.csv('hello.csv')

You can do without setwd:

read.csv('/tmp/hello.csv')