I can see the following problems in your code:
- read.file() needs to be replaced with read_csv() or read.csv() based on the libraries being used in the code.
- print() function is missing - if you directly use omega (you may not be able to see the results always. use print(omega(my.data)).
Corrections:
my.data <- read_csv("path/to/your_file.csv")
print(omega(my.data))
Try this and see it that works.