I'm attempting to use detach by pasting together arguments. this should be an easy job but is not for me. I knew it was time to ask for help when I thought about using eval(parse())
Normally if I load a package I can detach it as follows:
detach(package:reshape)
I want to do the same by passing the packahe name as a character vector. Here's my attempt:
pack<-"reshape"
detach(paste("package:", pack, sep=""))
Yielding the following error:
> detach(paste("package:", pack, sep=""))
Error in detach(paste("package:", pack, sep = "")) :
invalid 'name' argument
Help me please.