Needs correct indenting, `<-` instead of `=`, and I'd prefer `length(out) == 0`.  

The structure of the if looks weird to my eyes too, maybe: `if (length(out) == 0) no_output() else out`?