Search code examples
r-exams

Warning message in R environment of Sweave file


I keep having the warning message when I execute the following chunk of code. How that could be fixed?

<<fig=TRUE, height=3.5, width=3.5, echo=FALSE, eps=FALSE, results=hide>>=
include_supplement("data.txt")
data <- read.table("data.txt", header=T)
p1<-plot(data[,2], main="XYZ")
p1
@

Warning message:
file stem ‘q.stoch_trend-Copy-001’ is not portable

Solution

  • As the warning message says, it's the file stem q.stoch_trend-Copy-001 on all systems. The . is the problem because some systems might think that this is the end of the prefix and the beginning of the suffix. So I would suggest to replace that with _ or -: q_stoch_trend-Copy-001.