0

I am trying to read a file my code is simply:

df   = read.table("DF",header=FALSE)

I am doing this for df1, df2, df3, etc. But for some reason I reach an error at df. It is more 7x as long as some of the other files if that makes any difference.

the error i get is:

> debugSource('script.R')
Called from: eval(expr, p)
Browse[1]> n
debug at //location/to/file/script.R#13: df = read.table("DF",header=FALSE)
Browse[2]> 

df = read.table("DF",header=FALSE) works perfectly find in the command input line, but can anyone explain why I can't get it to run in the script?

Mason J.
  • 65
  • 4
  • 2
    It may be that the working directory may be different for the two environments. Try specifying the full path to DF – G5W Apr 06 '18 at 19:00
  • I fixed the issue by putting that line on top so that it is run first. – Mason J. Apr 06 '18 at 19:02
  • When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Apr 06 '18 at 19:02

0 Answers0