Summarizing what you already seem to have solved and written in the comments:
- issue had nothing to do with nls or max
- issue was due to a bad access to a dataframe column, either bad syntax or else you had shadowed the definitions of Q, GR by defining variables with those names
- this then gave you an empty vector, which causes max to return Inf/-Inf
- solution was to fix the column access, or don't define the offending shadowing variables
My tip: summary, max and min are a pain in R since they don't handle either NAs or completely empty inputs well. So always either eyeball their input vector to double-check for sanity, or else assign their input to a variable and inspect that.