Closed kirstenmmcm closed 7 years ago
Hi Kirsten,
I have made a few changes to the code. This makes the version on CRAN not be compatible anymore with the examples on github. Can you please try to install patternize like this:
install.packages("devtools") library(devtools) install_github("StevenVB12/patternize")
That being said, I also found an error in my changes that would have made the example fail. Some many thanks for reporting this!
Please let me know if it works or not!
Thanks, Steven
It works! Thanks very much!
Kirsten
Great! Can I know what you're planning to use it for? :)
Cheers, Steven
Hi Steven,
When running your first example (Analysis for Figure 1), I come across a problem when running alignment of color patterns, whether using patLanRGB or patRegRGB.
When running the given code for patLanRGB (rasterList_lanRGB <- patLanRGB(imageList, landmarkList, RGB, transformRef = 'BC0004', resampleFactor = 3, colOffset = 0.15, crop = TRUE, res = 200, adjustCoords = TRUE, plot = 'stack'), I get the following: [1] "sample 1 BC0004 added to array" [1] "sample 2 BC0049 added to array" [1] "sample 3 BC0050 added to array" [1] "sample 4 BC0071 added to array" [1] "sample 5 BC0077 added to array" [1] "sample 6 BC0079 added to array" [1] "sample 7 BC0082 added to array" [1] "sample 8 BC0125 added to array" [1] "sample 9 BC0129 added to array" [1] "sample 10 BC0366 added to array" ...and then the following error message: 'Error in if (plot) { : argument is not interpretable as logical' Which ultimately results in an all black heatmap.
If I change the patLanRGB code to plot = 'TRUE' or plot = 'FALSE', I get: [1] "sample 1 BC0004 added to array" [1] "sample 2 BC0049 added to array" [1] "sample 3 BC0050 added to array" [1] "sample 4 BC0071 added to array" [1] "sample 5 BC0077 added to array" [1] "sample 6 BC0079 added to array" [1] "sample 7 BC0082 added to array" [1] "sample 8 BC0125 added to array" [1] "sample 9 BC0129 added to array" [1] "sample 10 BC0366 added to array" [1] "sample BC0004 done and added to rasterList" [1] "sample BC0049 done and added to rasterList" [1] "sample BC0050 done and added to rasterList" [1] "sample BC0071 done and added to rasterList" [1] "sample BC0077 done and added to rasterList" [1] "sample BC0079 done and added to rasterList" [1] "sample BC0082 done and added to rasterList" [1] "sample BC0125 done and added to rasterList" [1] "sample BC0129 done and added to rasterList" [1] "sample BC0366 done and added to rasterList" ...and then, an all black heatmap for both.
When running the given code for patRegRGB, (rasterList_regRGB <- patRegRGB(imageList, target, RGB, resampleFactor = 5, colOffset= 0.15, removebg = 100, plot = 'stack'), nothing seems to be processed and I get the same warning: 'Error in if (plot) { : argument is not interpretable as logical'. However, I seem to get working heatmap.
Any ideas what I'm doing wrong, or why I'm getting these warnings?
Thanks!
Kirsten