Install.packages("ggplot2") installing older version (1.0.0) - r

So I installed an old version of ggplot2 with install_version from devtools (0.9.1 or something) to see how it worked - over the previously installed 2.0.0 version by the way. I then upgraded the version and it surprisingly gave me version 1.0.0, not the current 2.0.0.
Now when I do an install.packages("ggplot2") I get the same 1.0.0. Also selecting "Check for package upgrades.." item from the Rstudio menu it tells me "All packages up to date".
What gives? Isn't the newest version of ggplot now 2.0.0? Here is my session info:
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
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] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.9.1 ggplot2_1.0.0 dplyr_0.4.3 shiny_0.12.2 RevoUtils_7.5.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.2 magrittr_1.5 MASS_7.3-43 munsell_0.4.2 colorspace_1.2-6
[6] xtable_1.8-0 R6_2.1.1 stringr_1.0.0 plyr_1.8.3 tools_3.2.2
[11] parallel_3.2.2 grid_3.2.2 gtable_0.1.2 DBI_0.3.1 htmltools_0.2.6
[16] assertthat_0.1 digest_0.6.8 reshape2_1.4.1 memoise_0.2.1 mime_0.4
[21] stringi_1.0-1 scales_0.3.0 jsonlite_0.9.19 httpuv_1.3.3 proto_0.3-10
>
Here are the repositories it is seeing:
> AP <- available.packages()
> apdf <- data.frame(AP)
> unique(apdf$Repository)
[1] http://mran.revolutionanalytics.com/snapshot/2014-12-01/src/contrib
[2] http://www.stats.ox.ac.uk/pub/RWin/src/contrib
2 Levels: http://mran.revolutionanalytics.com/snapshot/2014-12-01/src/contrib ...
>
Update:
Thanks to Dirk, I see what happened. Looks like installing RRO package reset my CRAN repository. I can also sort of see why that had to be, although maybe I should have got a warning about it. From this blog entry I see how to fix it too. http://www.r-bloggers.com/permanently-setting-the-cran-repository/

Run
AP <- available.packages() # possibly with repo options
and examine the result set.
That is what your R session knows about packages, and it is a function of
the R version; you generally want the newest series (and you have 3.2.*)
the repos you select (which you did not show)
Edit: I typically use options("repos") to check which repositories I have, and I tend to control that from Rprofile.site. But you seem to have RevoR and I do not know how/if that interacts.

Related

Ctrl + Shift + D doesn't run documentation routines

According to the shortcuts help (Alt+Shift+K) the combination Ctrl+Shift+D should run the documentation routines. (This is also said in Section 5.1 of Hadley Wickhams "R packages" http://runsheng.github.io/attachment/r-packages.pdf.) But in my RStudio-setting, it doublicates the selected row (so I don't belive it is a global usage problem brought up in the answers here: Visual Studio won't recognize key combination). On https://support.rstudio.com/hc/en-us/community/posts/201819358-Ctrl-Shift-D-doesn-t-run-document-in-preview-release the issue was brought up by someone, but without a solution. How can I make RStudio do what it should do?
I'm using RStudio version 0.99.902 and sessionInfo() gives:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] hmi_0.1.0 roxygen2_5.0.1 coda_0.18-1 MASS_7.3-45 devtools_1.12.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.3.1 withr_1.0.2 rstudioapi_0.6 Rcpp_0.12.5
[6] memoise_1.0.0 stringi_1.1.1 grid_3.3.1 stringr_1.0.0 digest_0.6.9
[11] lattice_0.20-33
Can you double check what these options are set to in Project Options?
You might need to ensure that both
Use devtools package functions in available
Generate documentation with Roxygen
are both checked.

rstudio version 0.99.878 source editor pop out window lagging

I recently downloaded rstudio version 0.99.878 and was really excited about using the pop out source editor for easier viewing,coding, and editing experience.
Now when I edit in the separate window I find the editing to lag about a half a second and it makes coding many times slower.
I have never had this problem in rstudio before, and the lag is considerably reduced when I have the source editor in the program.
My computer is running fine and I have a:
i5 dell latitude
8gb ram
SSD drive
my other programs do not lag.
I am running r version 3.2.2. Any ideas?
(I would have put this as a comment, but I need reputation, you know the chicken and the egg thing)
Session Info
R version 3.2.2 (2015-08-14)
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 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lubridate_1.5.0 reshape2_1.4.1 dplyr_0.4.3 ggplot2_2.0.0 extrafontdb_1.0 extrafont_0.17 Rttf2pt1_1.3.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.3 digest_0.6.9 assertthat_0.1 grid_3.2.2 plyr_1.8.3 R6_2.1.2 gtable_0.1.2
[8] DBI_0.3.1 magrittr_1.5 scales_0.3.0 stringi_1.0-1 lazyeval_0.1.10 labeling_0.3 tools_3.2.2
[15] stringr_1.0.0 munsell_0.4.2 parallel_3.2.2 colorspace_1.2-6

Can not install shinyTable successfully

I followed the instruction on the Github. It returned me an error like this:
install_github("shinyTable", "trestletech")
Downloading github repo trestletech/shinyTable#master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
In addition: Warning message:
Username parameter is deprecated. Please use trestletech/shinyTable
Then, I tried to download the repo zip file and installed the shinyTable from local zip file in R studio. After that, I library(shinyTable). It return me an error.
> install.packages("D:/UserData/xxxx/Downloads/shinyTable-master.zip", repos = NULL)
Installing package into ‘D:/UserData/xxxx/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
> library(shinyTable)
Error in library(shinyTable) : there is no package called ‘shinyTable’
This is sessionInfo() result:
R version 3.2.1 (2015-06-18)
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] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinyRGL_0.1.0 devtools_1.8.0 rJava_0.9-7
loaded via a namespace (and not attached):
[1] rgl_0.95.1247 Rcpp_0.12.0 digest_0.6.8 mime_0.3 R6_2.1.0 xtable_1.7-4 git2r_0.10.1
[8] magrittr_1.5 httr_1.0.0 stringi_0.5-5 curl_0.9.2 xml2_0.1.1 tools_3.2.1 stringr_1.0.0
[15] shiny_0.12.2 httpuv_1.3.3 rversions_1.0.2 htmltools_0.2.6 tcltk_3.2.1 memoise_0.2.1
Does anyone know the reason and tell me how to install it? Thank you.
I had similar issues recently. Can you try this:
library(devtools)
install_git("https://github.com/trestletech/shinyTable")

Lazyeval over-writing dplyr?

Not quite understanding what "lazyeval" is, I was trying to install and run the package to use dplyr within a function.
When I ran
library(lazyeval)
I got the error message:
Error in library(lazyeval) : there is no package called 'lazyeval'
even after successfully installing.
Now, though, when I try to run any standard dplyr script, I get the following error message:
Error in loadNamespace(name) : there is no package called 'lazyeval'
It's as if the lazyeval has over-written dplyr, but I can't actually use lazyeval.
Has anyone run into this issue? If so, how did you resolve?
Some info:
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid splines stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] scales_0.2.4 gridExtra_0.9.1 ggplot2_1.0.0 forecast_5.4
[5] timeDate_3010.98 reshape2_1.4 xts_0.9-7 zoo_1.7-11
[9] lubridate_1.3.3 dplyr_0.4.1 plyr_1.8.1
loaded via a namespace (and not attached):
[1] assertthat_0.1 colorspace_1.2-4 DBI_0.3.1 digest_0.6.4
[5] fracdiff_1.4-2 gtable_0.1.2 lattice_0.20-29 magrittr_1.0.1
[9] MASS_7.3-35 memoise_0.2.1 munsell_0.4.2 nnet_7.3-8
[13] parallel_3.1.2 proto_0.3-10 quadprog_1.5-5 Rcpp_0.11.1
[17] stringr_0.6.2 tools_3.1.2 tseries_0.10-32
When I run .libPaths(), I get two directories:
[1] "C:/Users/MTULLA/Documents/R/win-library/3.1"
[2] "C:/Program Files/R/R-3.1.2/library"
In the first, I can find both dplyr and lazyeval, both with .dll files. In the second, I can't find either
I also got this message when running the lesson 1 of Getting and Cleaning Data on Swirl.
Package ‘dplyr’ loaded correctly!
Error in loadNamespace(name) : there is no package called ‘lazyeval’
Reinstalling packages also didn't work
It was solved by updating my R version using the {installr} package
It can be resolved by installing the package with all the dependencies, using:
install.packages("dplyr", dependencies = TRUE)
It will install others like lazyeval, knitr etc. Worked for me to solve the
Error in loadNamespace(name): there is no package called ‘lazyeval’ issue.

Cannot run any ggsubplot examples

I am trying to run the example from the geom_subplot help page from the ggsubplot package.
library(ggplot2)
devtools::install_github('ggsubplot', 'garrettgman')
library(ggsubplot)
ggplot(nasa) +
geom_subplot(aes(long, lat, group = id,
subplot = geom_point(aes(surftemp, temperature), size = 1/4))) +
coord_map()
And I get the following error:
Error in layout_base(data, vars, drop = drop) :
At least one layer must contain all variables used for facetting
This same error occurs with with every ggsubplot example I've tried to run so far. I've tried with both the CRAN and github version of ggsubplot. I would bet this is an incompatibility with the newest version of ggplot2 but I don't know enough about ggplot development to diagnose it myself.
R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggsubplot_0.3.1 ggplot2_0.9.3.1 devtools_1.5
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 digest_0.6.4 evaluate_0.5.5 grid_3.1.0 gtable_0.1.2 httr_0.3 labeling_0.2 MASS_7.3-32
[9] memoise_0.2.1 munsell_0.4.2 parallel_3.1.0 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.1 RCurl_1.95-4.1 reshape2_1.4
[17] scales_0.2.4 stringr_0.6.2 tools_3.1.0 whisker_0.3-2
It seems that package ggsubplot no longer is maintained.
Message on CRAN (as of 2016-12-23):
Package ‘ggsubplot’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2016-01-11 as requested by the maintainer garrett#rstudio.com.
On GitHub (https://github.com/garrettgman/ggsubplot), the last commit dates back to 2015-07-09.
Installation from GitHub under R 3.3.2 with devtools::install_github('garrettgman/ggsubplot') failed with an error message complaining about missing function eval.

Resources