The problem is in this line.
Radi <- (G*M/omega^3)*(1/3)
where the operation is missing *
if/else statement allows your program to decide which code to execute based on some condition. As in your code, you have two blocks of code, the first of which:
omega <- 2*pi/R
which you want to fulfill only if any condition is true, i.e. R == 98 , otherwise you are executing another block of code.
for statement used if you want to repeatedly execute a block of code many times. Let's say you want to print numbers from 1-100 , it is not possible to write print(1) print(2) ... 100 times!
You do this with a simple for loop, for example.
for(i in 1:100){ print(i) }
iTech source share