Random error when using read.table() function in R

58 Views Asked by At
#Set important packages
library(tidyverse)
library(lubridate)
library(ggplot2)

#Set working directory
setwd("C:/Users/data") 

#Read table
wd <- read.table("data.txt",header=T, dec=".", fill=FALSE)
str(wd)

I am rather new in the community, I am basically running chunks of the code including some ggplot. But when I realize I need to modify a bit more the data set and go back to the loading of the file this error comes up.

Is normally fixed when I close the program and open it again, but not convenient for the long run. Has anyone experience this and how did you solve it?

Thank you in advance!! Here is the error:

Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument

Is normally fixed when I close the program and open it again, but not convenient for the long run. Has anyone experience this and how did you solve it?

0

There are 0 best solutions below