I have a dataset names subData which have 12 rows and 3591 columns.
str(subData)
#'data.frame': 3591 obs. of 13 variables:
#$ geneNames: Factor w/ 48803 levels "ILMN_1343291",..: 13 17 20 45 48 68 85 86 143 150 ...
#$ GSM940873: num 9.4 10.45 13.85 10.76 7.77 ...
#$ GSM940874: num 9.44 10.37 13.84 10.74 7.97 ...
#$ GSM940875: num 9.43 10.61 13.93 10.73 7.91 ...
#$ GSM940882: num 9.54 10.24 13.54 10.25 10.74 ...
#$ GSM940883: num 9.57 10.35 13.23 10.24 10.8 ...
#$ GSM940884: num 9.58 10.26 13.55 10.33 10.81 ...
#$ GSM940879: num 8.52 10.92 13.35 10.78 8.7 ...
#$ GSM940880: num 8.75 10.75 13.24 10.78 8.52 ...
#$ GSM940881: num 8.7 10.93 13.14 10.94 8.48 ...
#$ GSM940888: num 8.89 10.03 12.99 10.39 11.21 ...
#$ GSM940889: num 8.58 10.02 12.87 10.23 11.13 ...
#$ GSM940890: num 8.68 10.12 13 10.34 11.03 ...
subData$geneNames <- with(subData, reorder(geneNames, GSM940873))
nba.m <- melt(subData)
head(nba.m)
str(nba.m)
nba.m <- ddply(nba.m, .(variable), transform,
rescale = rescale(nba.m$value))
When I run the code of ddply it gives the following error
Error: Usage: rescale(x,newrange) where x is a numeric object and newrange is the new min and max
Why?
It should be noted that I have called reshape, ggplot2, scales, reshape2 packages before running the code.