Hello...
I am new to R and have an assignment to complete and I keep on getting the following message
Error in [.data.frame(hr, c("Turn1", "Turn2", "Turn3", "Turn4")) :
undefined columns selected
Not sure what the message means this is the original code that I typed into R
alpha(hr[c("Turn1","Turn2","Turn3","Turn4")])
I guess you are trying to select the columns Turn1, Turn 2, etc. from the data frame hr. When you subset a data frame using [ , you have to provide both rows and columns, designating the rows first and then the columns. You have not chosen any rows. If you want all rows, you can write
hr[, c("Turn1","Turn2","Turn3","Turn4")]
Edit: Yarnabrina is correct in the post below that the comma is not necessary. My response above is not helpful.