Unknown or uninitialised column warning issue

Hi! I am pretty new to R studio, but have previously been successful after importing a data set into R studio, and creating columns. I imported a new data set, following all the same steps as before, and I am unable to proceed from there, as I keep getting the warning: Unknown or uninitialised column: Distance.
Ive tried putting:
Distance<-Book$Distance
#Distance is the name of the data and Book is the Excel file where the data is stored
and then
Distance<-Distance$AMDistance
#AMDistance is the name of the first column of data that I am trying to generate a histogram from.

Unfortunately I am unable to even get past this, as I keep getting the same warning message: Unknown or uninitialised column: Distance.

Any help would be greatly appreciated!!

It sounds like you may not have a column called "Distance" in your Book data.frame.

Could you run:

str(Book)

to display the structure of the Book object?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.