I'm trying to create a function in R with the following formula:
#k= 3
mySum <- function(rin=12, cout=28, cin=20) {
output <- 1/3(rin * ((cin + cout+1)/(cin+1))-rin)
return(output)
}
I want the output to return the value with the inputs specified, rin= 12, cout= 28, cin=20- but I just get an 'attempt to apply a non-function' error. Any help?