on-internet
← Community

Suppress messages and possibly warnings when loading libraries in a reprex example

Stack Overflow ·

I would like to use a reprex package when generating an answer/question1 that utilises multiple packages. Say I want to provide the following answer library("gdata") dfA <- data.frame(colA = c(1, 2), colB = c(3, 4)) ls() mv(from = "dfA", to = paste0("df", "B")) ls() If I pass this code directly to reprex the output will be as follows: library("gdata") #> gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED. #> #> gdata: Unable to load perl libaries needed by read.xls() #> gdata: to support 'XLSX' (Excel 2007+) files. #> #> gdata: Run the function 'installXLSXsupport()' #> gdata: to

Comments

Sign in or sign up to comment and upvote.

No comments yet.