trying to fix the error in sweave