This problem looks like this …

> df <- read.csv("data/no-header.csv")
> str(df)
'data.frame':   2 obs. of  2 variables:
 $ X3: int  5 7
 $ X4: int  6 8
> df
  X3 X4
1  5  6
2  7  8

If you used read.csv(), then this problem usually occurs if you have not included a header row on your CSV file. See how to construct an external CSV file in this FAQ.