I have imported a file with headings and numbers in multiple columns using the following command.
irs_data <- read.csv(file="10incyallnoagi.csv")
I would like to divide the values in 1 column by another and then determine the highest 3 values.
salary_var <- c(irs_data[13]/irs_data[12])
head(sort(new_var, decreasing=TRUE), 3)
I keep getting the constant error. As a beginner to R, what does it mean "x must be atomic" in this context.
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic