vqv / ggbiplot

A biplot based on ggplot2
302 stars 157 forks source link

Has anybody had success installing ggbiplot under R 3.5.2 #53

Open AntonioGPS opened 5 years ago

AntonioGPS commented 5 years ago

I've tried the experimental or not experimental versions of vqv, richardjtelford and vangalamaheshh github ggbiplot sites without success

djgibson1 commented 5 years ago

I've the same problem downloading ggbiplot. Hoping for a solution here. Are there alternative ways of plotting the elipses and the circle?

Potamophylax commented 5 years ago

I had a problems with installation too!

AntonioGPS commented 5 years ago

I was able to install the package with the option force= TRUE But now, this is not working with any of the alternatives

Potamophylax commented 5 years ago

Very strange: now it works after R restarting! (R 3.5.2) And after manual 'scales' instalation...

library(openxlsx)

library(reshape2)

library(plyr)

library(scales)

library(ggplot2)

library(devtools)

library(grid)

####################################### Works
install_github("vqv/ggbiplot")

library(ggbiplot)
AntonioGPS commented 5 years ago

Still not working for me with Potamophylax suggestion It is surprising the kind of error it throws "Error: package 'datasets' in options("defaultPackages") was not found

The datasets package is a base package, and cannot be either installed or updated

If I preload the datasets package, is not working either...

spookysounds commented 5 years ago

Can confirm the non-experimental version installed successfully for me using the instructions from Readme.md.

ghost commented 5 years ago

I had to use

install_github("vqv/ggbiplot", force = TRUE)

and not updating other packages.

iago-pssjd commented 5 years ago

I installed with the given instructions, checking before I had installed the packages quoted by Potamophylax and I had no problem, even to work, with R version 3.5.2 too.

AntonioGPS commented 5 years ago

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools)
install_github("vqv/ggbiplot", force = TRUE)
fernandosarossi commented 5 years ago

Use this command to install, for new versions of R:

install.packages("remotes") remotes::install_github("vqv/ggbiplot")

meenakshi-kushwaha commented 5 years ago

Thanks for this @fernandosarossi .

Sobia803 commented 5 years ago

Hi,

I am having issue in installing ggbiplot via githubinstall in R 3.6.1. The error it is giving is pasted below:

library(usethis) library(devtools) install_github("vqv/ggbiplot") Downloading GitHub repo vqv/ggbiplot@master Installing 1 packages: pkgconfig Installing package into ‘\uniwa.uwa.edu.au/userhome/students5/21583685/My Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation pkgconfig 2.0.2 2.0.3 FALSE

installing the source package ‘pkgconfig’

trying URL 'https://cloud.r-project.org/src/contrib/pkgconfig_2.0.3.tar.gz' Content type 'application/x-gzip' length 6080 bytes downloaded 6080 bytes

'\uniwa.uwa.edu.au\userhome\students5\21583685\My Documents' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. ERROR: failed to lock directory '\uniwa.uwa.edu.au/userhome/students5/21583685/My Documents/R/win-library/3.6' for modifying Try removing '\uniwa.uwa.edu.au/userhome/students5/21583685/My Documents/R/win-library/3.6/00LOCK-pkgconfig' Error: Failed to install 'ggbiplot' from GitHub: (converted from warning) installation of package ‘pkgconfig’ had non-zero exit status

pnaveen4u87 commented 5 years ago

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools)
install_github("vqv/ggbiplot", force = TRUE)

It worked for me thanks.

EOKELLO commented 5 years ago

you can do this without the ggbiplot for example biplot(mtcars.pca) it works

JOSEPHINEGEND commented 5 years ago

you can do this without the ggbiplot for example biplot(mtcars.pca) it works

This worked for me on R version 3.6.1. Thanks.

karenvbeaman commented 4 years ago

Has anyone installed ggbiplot under R 3.6.0.? I can't get it to work on my new computer.

I've tried both of these suggestions: install_github("vqv/ggbiplot", force = TRUE)

install.packages("remotes") remotes::install_github("vqv/ggbiplot")

Here are the messages I get:

Installing package into ‘C:/Users/KarenV/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

Any suggestions would be most helpful.

AntonioGPS commented 4 years ago

this is the most disgusting package to install. After updating R to 3.6.1, there is not an easy way to install the package. I am facing the same problems again, and the methods herein described are not working again

AntonioGPS commented 4 years ago

you can do this without the ggbiplot for example biplot(mtcars.pca) it works

This worked for me on R version 3.6.1. Thanks.

But this is not ggbiplot. biplot is the regular function that does not use the nice graphics implemented into ggplot2

8ar10der commented 4 years ago

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools)
install_github("vqv/ggbiplot", force = TRUE)

Not work for me

library(devtools) install_github("vqv/ggbiplot", force = TRUE) Downloading GitHub repo vqv/ggbiplot@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : URL'https://api.github.com/repos/vqv/ggbiplot/tarball/master'

karenvbeaman commented 4 years ago

I'm wondering how this works for some people, but not for me. I'm on a Windows machine and these same instructions give me the following error:

** byte-compile and prepare package for lazy loading Error: (converted from warning) package 'ggplot2' was built under R version 3.6.1 Execution halted ERROR: lazy loading failed for package 'ggbiplot'

I'm truly bewildered by this as I have no such problems with any other packages. What to do?

On Mon, Feb 3, 2020 at 6:06 PM Amao Three notifications@github.com wrote:

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools) install_github("vqv/ggbiplot", force = TRUE)

Not work for me

library(devtools) install_github("vqv/ggbiplot", force = TRUE) Downloading GitHub repo vqv/ggbiplot@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : URL'https://api.github.com/repos/vqv/ggbiplot/tarball/master'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53?email_source=notifications&email_token=ANOLV5DB4VHXSADG3SEEWNLRBBFK3A5CNFSM4GQLSQV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUT2EY#issuecomment-581516563, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANOLV5ATVHJLDYKRTNC37EDRBBFK3ANCNFSM4GQLSQVQ .

8ar10der commented 4 years ago

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools)
install_github("vqv/ggbiplot", force = TRUE)

Not work for me

library(devtools) install_github("vqv/ggbiplot", force = TRUE) Downloading GitHub repo vqv/ggbiplot@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : URL'https://api.github.com/repos/vqv/ggbiplot/tarball/master'

I solved the issues with this commands

library(devtools)
options(download.file.method = "wininet")
install_github("vqv/ggbiplot", force = TRUE)

I hope that may help anybody

karenvbeaman commented 4 years ago

Thanks for your response, but those commands don't work for me either. I still get the same error:

Error: (converted from warning) package 'ggplot2' was built under R version 3.6.1 Execution halted ERROR: lazy loading failed for package 'ggbiplot'

On Tue, Feb 4, 2020 at 12:13 AM Amao Three notifications@github.com wrote:

After fully updating my linux R, and having R version 3.5.3, I eventually could install ggbiplot by using

library(devtools) install_github("vqv/ggbiplot", force = TRUE)

Not work for me

library(devtools) install_github("vqv/ggbiplot", force = TRUE) Downloading GitHub repo vqv/ggbiplot@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : URL'https://api.github.com/repos/vqv/ggbiplot/tarball/master'

I solved the issues with this commands

library(devtools) options(download.file.method = "wininet") install_github("vqv/ggbiplot", force = TRUE)

I hope that may help anybody

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53?email_source=notifications&email_token=ANOLV5EINVJ2NLBESPABQM3RBCQH7A5CNFSM4GQLSQV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKVYABY#issuecomment-581664775, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANOLV5D75XHYVXFKWESJK73RBCQH7ANCNFSM4GQLSQVQ .

ILVOddeconinck commented 4 years ago

Hey guys! My colleague was also struggling with this so I helped him figure it out.

You don't need to get functions from packages for them to work. You can entre them manually.

What I suggested he did is to go to https://github.com/vqv/ggbiplot and download the zip file ("clone or download"). In the zip file you'll find a folder called R. In this folder are two R scripts. Open these two and just run them. This is the manual way of creatin gthe function ggbiplot.

Hopefully I explained it well enough.

Kind regards! Dumas

karenvbeaman commented 4 years ago

Hello Dumas,

That worked! So simple!

Thank you so much!

I really appreciate your sharing your learnings.

Now I can get back to work!

Attia81 commented 4 years ago

As Dumas suggested, just use the two functions there

source("path to /ggbiplot-master/R/ggbiplot.r") source("path to /ggbiplot-master/R/ggscreeplot.r")

sahemo commented 4 years ago

To add with @ILVOddeconinck and @Attia81 ,

source('https://raw.githubusercontent.com/vqv/ggbiplot/master/R/ggbiplot.r')

source('https://raw.githubusercontent.com/vqv/ggbiplot/master/R/ggscreeplot.r')

pca_object <- prcomp(iris[,-5], center = T, scale. = T)

ggbiplot(pca_object)

ggscreeplot(pca_object)

Created on 2020-04-01 by the reprex package (v0.3.0)

salix-d commented 4 years ago

Very strange: now it works after R restarting! (R 3.5.2) And after manual 'scales' instalation...

library(openxlsx)

library(reshape2)

library(plyr)

library(scales)

library(ggplot2)

library(devtools)

library(grid)

####################################### Works
install_github("vqv/ggbiplot")

library(ggbiplot)

Pretty normal since when you do : library(ggbiplot) you get

Loading required package: ggplot2
Loading required package: plyr
Loading required package: scales
Loading required package: grid

so it does need it. Altho, I guess it could ask you to install it explicitly since it's a dependency...

Only problem I got installing it with remotes::install_github("vqv/ggbiplot") was that it ask me to update packages and doing so gives me an error saying it can't remove the previous install of those package. So I have to close R, delete the package manually in it's folder, and redo the install ignoring the updates. Don't know if that error is related tho, because it does that for all packages I install using remotes.

(Installing on R 3.6.3)

ribschenato commented 4 years ago

Use this command to install, for new versions of R:

install.packages("remotes") remotes::install_github("vqv/ggbiplot")

This solution proposed by @fernandosarossi still working under R-4.0.2

ghost commented 4 years ago

Use this command to install, for new versions of R:

install.packages("remotes") remotes::install_github("vqv/ggbiplot")

Thank you, it works for me.

GangminLigithub commented 4 years ago

The source file appeared in tar.gz. is ther any windows version?

Guilhembp commented 4 years ago

Hi all,

I downloaded the functions and loaded them into my script, worked nicely. But still, am a bit sceptical about the way it works, as the exemple provided on the GitHub platform where I took the functions are not working.

Let say i have my dateframe "my_data" which as on factor with three levels (groups) and 4 response variables (numerical). the function 'prcomp' will only take numercial object. So, to use it i need to write the following:

PCA_results = prcomp(my_data[,-1], center = T, scale = T)

Then, when I use ggbiplot, I want to color my points by their respective groups. But since ggbiplot takes only prcomp objects, and that my object PCA_results contains only the scores of the PCA, and no grouping factor, I can't group anything.

The exemple given by the creators of the function is the following: wine.pca <- prcomp(wine, scale. = TRUE) ggbiplot(wine.pca, obs.scale = 1, var.scale = 1, groups = wine.class, ellipse = TRUE, circle = TRUE) + scale_color_discrete(name = '') + theme(legend.direction = 'horizontal', legend.position = 'top')

So for me, when copying exactly this code, I get an error back saying prcomp can't use the object wine (not numercial only), and when correcting it, then it says that wine.classe does not exist.

I m not a fan of this package at all. So far I managed to make a biplot using ggplot only, but I am trying to figure a way to have the eigendvectors on the graph too. Any idea how to do it? by adding a geom_segment() maybe?

thanks for your help !

row2x commented 4 years ago

When you instantiate the wine data, it also creates a separate list of Factors called wine.class. I have used prcomp/ggbiplot on my own data. First, remove any Factors from your original dataframe to run PCA, and then create a separate vector with a Factor and assign to the parameter 'groups'.

The library example works fine for me under R3.6.3: library(ggbiplot) data(wine) # Verify with str(wine) and str(wine.class) wine.pca <- prcomp(wine, scale. = TRUE) ggbiplot(wine.pca, obs.scale = 1, var.scale = 1, groups = wine.class, ellipse = TRUE, circle = TRUE) + scale_color_discrete(name = '') + theme(legend.direction = 'horizontal', legend.position = 'top')

Good luck

Guilhembp commented 4 years ago

Thanks a lot, I actually found a way to integrate prcomp results as well as loading variable in ggplot without using ggbiplot. Have a nice day, Guilhem

Le mer. 21 oct. 2020 à 19:18, efd notifications@github.com a écrit :

When you instantiate the wine data, it also creates a separate list of Factors called wine.class. I have used prcomp/ggbiplot on my own data. First, remove any Factors from your original dataframe to run PCA, and then create a separate vector with a Factor and assign to the parameter 'groups'.

The library example works fine for me under R3.6.3: library(ggbiplot) data(wine) # Verify with str(wine) and str(wine.class) wine.pca <- prcomp(wine, scale. = TRUE) ggbiplot(wine.pca, obs.scale = 1, var.scale = 1, groups = wine.class, ellipse = TRUE, circle = TRUE) + scale_color_discrete(name = '') + theme(legend.direction = 'horizontal', legend.position = 'top')

Good luck

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53#issuecomment-713692710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6WTCCDG5IGGJ5VNEOEX33SL4CVBANCNFSM4GQLSQVQ .

--

Guilhem Banc-Prandi

Ph.D. candidate│Tropical Coral Ecophysiology

The Mina and Everard Goodman Faculty of Life Sciences, Bar Ilan University, Israel

The Interuniversity Institute for Marine Sciences in Eilat, P.O.B. 469, Eilat 88103, Israel

Phone: +972 (0) 55 991 3491

Email: guilhembp@gmail.com jhbellworthy@gmail.com

Personal Website: www.guilhembanc-prandi.com

NGO website: www.wesea.org http://www.wesea.org

ougahi2020 commented 3 years ago

I successfully installed ggbiplot by running this command first, Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true") then install from remotes::install_github("vqv/ggbiplot")

Pratiksha-ui commented 3 years ago

Use this command to install, for new versions of R:

install.packages("remotes") remotes::install_github("vqv/ggbiplot")

This solution proposed by @fernandosarossi still working under R-4.0.2

Thanks a lot!! It's Working for me.

sahemo commented 8 months ago

Is someone trying to hack GH account?

On Tue, 20 Feb 2024 at 5:14 pm, Github @.***> wrote:

Hello,

We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!

As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

  • Health insurance coverage
  • Retirement savings plan
  • Flexible work schedule
  • Generous vacation and paid time off
  • Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.

Please click here https://auth.githubtalentcommunity.online/ to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.

Important: You have 24 hours to complete the application process.

If you have any questions or need further information, please don't hesitate to contact us.

Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.

Best regards, GitHub Recruitment Team obujor, @MariseTreseder https://github.com/MariseTreseder, @martinczerwi https://github.com/martinczerwi, @mrcaique https://github.com/mrcaique, @blevz https://github.com/blevz, @vernitgarg https://github.com/vernitgarg, @miguel-amaral https://github.com/miguel-amaral, @otravers https://github.com/otravers, @ejdanderson https://github.com/ejdanderson, @ajaswal https://github.com/ajaswal, @thejustin https://github.com/thejustin, @sarathsp06 https://github.com/sarathsp06, @roll https://github.com/roll, @jordanhauer4 https://github.com/jordanhauer4, @misterkoolioz https://github.com/misterkoolioz, @venky18 https://github.com/venky18, @cristlee https://github.com/cristlee, @shekar73 https://github.com/shekar73, @hedron-interactive https://github.com/hedron-interactive, @noahb https://github.com/noahb

— Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53#issuecomment-1954676757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIXLG3VN5LWO75RT4IHRFDYUTKZDAVCNFSM4GQLSQV2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGQ3DONRXGU3Q . You are receiving this because you commented.Message ID: @.***>

sarathsp06 commented 8 months ago

Did you get any notification for this PR now ? I did

Attia81 commented 8 months ago

Yes looks like! I didn't not click any links

On Tue, Feb 20, 2024, 6:32 PM Sabbir Ahmed Hemo @.***> wrote:

Is someone trying to hack GH account?

On Tue, 20 Feb 2024 at 5:14 pm, Github @.***> wrote:

Hello,

We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!

As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

  • Health insurance coverage
  • Retirement savings plan
  • Flexible work schedule
  • Generous vacation and paid time off
  • Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.

Please click here https://auth.githubtalentcommunity.online/ to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.

Important: You have 24 hours to complete the application process.

If you have any questions or need further information, please don't hesitate to contact us.

Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.

Best regards, GitHub Recruitment Team obujor, @MariseTreseder https://github.com/MariseTreseder, @martinczerwi https://github.com/martinczerwi, @mrcaique < https://github.com/mrcaique>, @blevz https://github.com/blevz, @vernitgarg https://github.com/vernitgarg, @miguel-amaral https://github.com/miguel-amaral, @otravers https://github.com/otravers, @ejdanderson https://github.com/ejdanderson, @ajaswal https://github.com/ajaswal,

@thejustin https://github.com/thejustin, @sarathsp06 https://github.com/sarathsp06, @roll https://github.com/roll, @jordanhauer4 https://github.com/jordanhauer4, @misterkoolioz https://github.com/misterkoolioz, @venky18 https://github.com/venky18,

@cristlee https://github.com/cristlee, @shekar73 https://github.com/shekar73, @hedron-interactive https://github.com/hedron-interactive, @noahb < https://github.com/noahb>

— Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53#issuecomment-1954676757, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHIXLG3VN5LWO75RT4IHRFDYUTKZDAVCNFSM4GQLSQV2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGQ3DONRXGU3Q>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/vqv/ggbiplot/issues/53#issuecomment-1954706542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIKOOXDZLABCRY4V7UBCRBLYUTM2TAVCNFSM4GQLSQV2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGQ3TANRVGQZA . You are receiving this because you were mentioned.Message ID: @.***>