Hi,
I am not 100% sure whether this issue should fall under this repository or Examples/PCR/YAwarePCA.Rmd,
but I am having an issue with the ScatterHistN() function.
You're articles were highly informative and the graphs that you have generated are incredibly helpful in allowing me to understand and explain the PCAs that I am working on. I ran across this issue when trying the y-scaled PCA for my data set. I thought it might have been just my dataset so I copied the entire script from Examples/PCR/YAwarePCA.Rmd and got the same problem.
When I get to the step:
`# apply projection
projectedTrain <- as.data.frame(dmTrain %*% proj,
stringsAsFactors = FALSE)
plot data sorted by principal components
projectedTrain$y <- dTrainNTreatedYScaled$y
ScatterHistN(projectedTrain,'PC1','PC2','y',
"Y-Scaled Training Data projected to first two principal components")`
This is the graph that is produced on my system:
![scatterhistn issue](https://cloud.githubusercontent.com/assets/23705496/21723782/bbc453c0-d3ff-11e6-9fd1-d50b548ba002.jpeg)
For some reason, no matter which PC i put as the "yvar" arguement, it returns the following warnings:
Warning messages:
1: In max(nchar(c(origlabs1, origlabs2))) :
no non-missing arguments to max; returning -Inf
2: In stri_pad_left(string, width, pad = pad) :
NAs introduced by coercion to integer range
3: In stri_pad_left(string, width, pad = pad) :
NAs introduced by coercion to integer range
Here is my session info in case the issue is there.
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] WVPlots_0.1 mgcv_1.8-16 nlme_3.1-128 stringr_1.1.0 plyr_1.8.4
[6] ROCR_1.0-7 gplots_3.0.1 reshape2_1.4.2 gridExtra_2.2.1 tidyr_0.6.0
[11] ggplot2_2.2.0 vtreat_0.5.28
loaded via a namespace (and not attached):
[1] Rcpp_0.12.8 magrittr_1.5 munsell_0.4.3 colorspace_1.3-2
[5] lattice_0.20-34 R6_2.2.0 dplyr_0.5.0 caTools_1.17.1
[9] tools_3.3.2 gtable_0.2.0 KernSmooth_2.23-15 DBI_0.5-1
[13] gtools_3.5.0 digest_0.6.10 lazyeval_0.2.0 assertthat_0.1
[17] tibble_1.2 Matrix_1.2-7.1 RColorBrewer_1.1-2 bitops_1.0-6
[21] labeling_0.3 gdata_2.17.0 stringi_1.1.2 scales_0.4.1
I greatly appreciate any help I can get with this issue!
Tyler