In R studio I have imported one .csv file which has two columns X and Y.
But when I try to use plot(X,Y), I get the error message:
"Object X not found"
In R studio I have imported one .csv file which has two columns X and Y.
But when I try to use plot(X,Y), I get the error message:
"Object X not found"
 
    
     
    
    I believe Alex's answer above is correct. The plot() function is complaining that X is not a variable, and you've already said it was a column instead. The "data" parameter tells plot not to try and interpret X and Y as variables, but as columns of a dataframe.
It would also work to use
plot(<name_of_dataframe>$X ~ <name_of_dataframe>$Y)
Where you replace <name_of_dataframe> with the actual name of the object that you imported the .csv into.
 
    
    