The reason is that your command:
ttest<--read.csv("ttest.csv", header = TRUE)
... has an extra dash after the <-
and R is interpreting this as a negative sign, and thus negating any numbers that it reads before it loads the data into ttest
.
In addition, there may be some confusion between read.csv()
, which is for reading comma-separated value files and read.table()
, which will read files like:
x y
1 2
1 3
2 1
2 3
... which is rather more what I think your file might have looked like originally.