Removing percentage signs with R I am learning R and have a tutorial that wants me to remove the percent sign.  The code they want me to use is:

 chocolateData$Cocoa_Percent &lt;- sapply(chocolateData$Cocoa_Percent, function(x) gsub("%", "", x))


My question pertains to what I may be typing wrong, or if there is a different way to do this with R?
The following code worked, thanks for the assistance.

chocolateData$Cocoa.Percent = as.numeric(gsub("[\\%,]", "", chocolateData$Cocoa.Percent))