I have faced this problem many times: Error: unexpected '}' in " }" but do not know how to solve it. Take a look below
This is the code that I typed in:
ownfunc <- function(x, t, l, m){
hardik <- paste(x, t, l, m)
if(x > 6){
if(x < t < l < m){
print(seq(from = x, to = m, by = 17))
cat("The second number is", t, "and the third number is", l)
}else{
print("The x input should be smaller than the m input")
}
}else{
print("Pls type a number greater than 6")
}
}
While the console is displaying:
}
Error: unexpected '}' in " }"
}
Error: unexpected '}' in "}"
Pls someone tell me what is wrong with the code, thnx in advance