{"action":"created","issue":{"url":"https://api.github.com/repos/vqv/ggbiplot/issues/12","labels_url":"https://api.github.com/repos/vqv/ggbiplot/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/vqv/ggbiplot/issues/12/comments","events_url":"https://api.github.com/repos/vqv/ggbiplot/issues/12/events","html_url":"https://github.com/vqv/ggbiplot/pull/12","id":81566648,"number":12,"title":"Choosing the number of variables to draw arrows for","user":{"login":"apuapaquola","id":4682303,"avatar_url":"https://avatars.githubusercontent.com/u/4682303?v=3","gravatar_id":"","url":"https://api.github.com/users/apuapaquola","html_url":"https://github.com/apuapaquola","followers_url":"https://api.github.com/users/apuapaquola/followers","following_url":"https://api.github.com/users/apuapaquola/following{/other_user}","gists_url":"https://api.github.com/users/apuapaquola/gists{/gist_id}","starred_url":"https://api.github.com/users/apuapaquola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apuapaquola/subscriptions","organizations_url":"https://api.github.com/users/apuapaquola/orgs","repos_url":"https://api.github.com/users/apuapaquola/repos","events_url":"https://api.github.com/users/apuapaquola/events{/privacy}","received_events_url":"https://api.github.com/users/apuapaquola/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-27T18:27:20Z","updated_at":"2015-05-29T19:18:16Z","closed_at":"2015-05-29T19:18:16Z","pull_request":{"url":"https://api.github.com/repos/vqv/ggbiplot/pulls/12","html_url":"https://github.com/vqv/ggbiplot/pull/12","diff_url":"https://github.com/vqv/ggbiplot/pull/12.diff","patch_url":"https://github.com/vqv/ggbiplot/pull/12.patch"},"body":"I've made some changes to allow the user to choose the number of variables to draw arrows for. The parameter nvars is the number of variables, and the parameter var.sizefactor is a linear multiplier that affects the size of arrows in the plot. For gene expression data, there's usually > 20k variables, and we want to draw the vectors for variables that are the top contributors to the displayed PCs. We sort the variables based on the radius of the projections on the two PCs displayed and select the top nvars."},"comment":{"url":"https://api.github.com/repos/vqv/ggbiplot/issues/comments/106907059","html_url":"https://github.com/vqv/ggbiplot/pull/12#issuecomment-106907059","issue_url":"https://api.github.com/repos/vqv/ggbiplot/issues/12","id":106907059,"user":{"login":"vqv","id":867637,"avatar_url":"https://avatars.githubusercontent.com/u/867637?v=3","gravatar_id":"","url":"https://api.github.com/users/vqv","html_url":"https://github.com/vqv","followers_url":"https://api.github.com/users/vqv/followers","following_url":"https://api.github.com/users/vqv/following{/other_user}","gists_url":"https://api.github.com/users/vqv/gists{/gist_id}","starred_url":"https://api.github.com/users/vqv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vqv/subscriptions","organizations_url":"https://api.github.com/users/vqv/orgs","repos_url":"https://api.github.com/users/vqv/repos","events_url":"https://api.github.com/users/vqv/events{/privacy}","received_events_url":"https://api.github.com/users/vqv/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T19:18:16Z","updated_at":"2015-05-29T19:18:16Z","body":"Two comments:\r\n\r\n1)\r\nI agree that it is useful to select a small number of important variables, however doing so based on the the magnitude of the PC loadings is not the best idea.  It is better to use a **sparse PCA** method that explicitly looks for a small number of variables that explain much of the variance.  See for example my [fps](https://github.com/vqv/fps) package.\r\n\r\n2)\r\nI have switched development to the [experimental branch of ggplot2](https://github.com/vqv/ggbiplot/tree/experimental).  If you really want to display just the variables with the largest loadings, I believe it is better to use to modular approach of the experimental branch rather than adding functionality to the already monolithic `ggbiplot()` function.  See this [example] (https://github.com/vqv/ggbiplot/tree/experimental#thresholded-correlation-biplot-with-rescaled-biplot-axes)"}}