Error in sink(type = "output") : invalid connection

Sorry you’re running into trouble. Does this suggestion help?