Possible Duplicate:
Error: could not find function … in R
I find various references to the function melt()
, actually melt.data.frame()
in stackoverflow for R. But when I call it in R, it gives me
Error: could not find function "melt"
How do I load that function so I can call it?
The melt function is to be found in the reshape package. If you do not have that package installed, then you will need to install it with install. packages("reshape") before you can use it. Then, when the package is installed, make it available with library(reshape) .
R melt() function. The melt() function in R programming is an in-built function. It enables us to reshape and elongate the data frames in a user-defined manner. It organizes the data values in a long data frame format.
The melt
function is to be found in the reshape
package.
If you do not have that package installed, then you will need to install it with install.packages("reshape")
before you can use it. Then, when the package is installed, make it available with library(reshape)
. At which point you are good to go!
Update 2018: The package in R 3.6.1. is now called reshape2
.
The reshape2
notes also say:
reshape2
is retired: only changes necessary to keep it on CRAN will be made. We recommend usingtidyr
instead.
tidyr
does not contain the melt
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With