trying to follow the quanteda tutorial, I'm running into problems here with the programme; executing the following code, I get error messages hinting at problems with packages I cannot resolve.
> require(quanteda)
> require(quanteda.corpora)
> require(ggplot2)
> corp_tweets <- download(url = 'https://www.dropbox.com/s/846skn1i5elbnd2/data_corpus_sampletweets.rds?dl=1')
Error in loadNamespace(name) : there is no package called ‘digest’
As the package seems to be missing, I tried loading it and get:
> require("digest")
Loading required package: digest
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘digest’
Now, I try installing it - again, without success.
> install.packages("digest")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/digest_0.6.20.zip'
Content type 'application/zip' length 223139 bytes (217 KB)
downloaded 217 KB
package ‘digest’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘digest’
The downloaded binary packages are in
C:\Users\my_username\AppData\Local\Temp\Rtmpaunnzu\downloaded_packages
Does anyone know how to take it from here? Help is much appreciated.
P.S.: This (unanswered) question did not help me either.
The only "solution" I could find was to re-install RStudio.
Related
I am very new to R. Working mostly with Seurat package to evaluate my single-cell RNAseq data.
Today I wanted to update the R version and RStudio. After that I had problems using installed packages. This is my problem:
> install.packages("Seurat", dependencies = TRUE)
Installing package into ‘C:/Users/benne/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘S4Vectors’, ‘SummarizedExperiment’, ‘SingleCellExperiment’, ‘MAST’, ‘DESeq2’, ‘BiocGenerics’, ‘GenomicRanges’, ‘GenomeInfoDb’, ‘IRanges’, ‘rtracklayer’, ‘monocle’, ‘Biobase’, ‘limma’ are not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/Seurat_4.2.0.zip'
Content type 'application/zip' length 2376157 bytes (2.3 MB)
downloaded 2.3 MB
package ‘Seurat’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\benne\AppData\Local\Temp\RtmpIlveV0\downloaded_packages
> library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘spatstat.data’
I think, there is no problem with the installation of Seurat-package but I cannot make the library-function work. I found other topics that tried to solve that problem but they did not help me.
What could be the problem? With the old R/RStudio version everything worked well. After the update I had to install the RTools42 because it said I have to do that. I have never done that before, why today??
I really hope, you guys may help me. I am totally lost!!
Attached my sessionInfo():
> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8
[4] LC_NUMERIC=C LC_TIME=German_Germany.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.4.4 tidyr_1.2.1 viridisLite_0.4.1 jsonlite_1.8.2 splines_4.2.1
[6] leiden_0.4.3 shiny_1.7.2 sp_1.5-0 ggrepel_0.9.1 globals_0.16.1
[11] pillar_1.8.1 lattice_0.20-45 glue_1.6.2 reticulate_1.26 digest_0.6.29
[16] RColorBrewer_1.1-3 promises_1.2.0.1 colorspace_2.0-3 plyr_1.8.7 cowplot_1.1.1
[21] htmltools_0.5.3 httpuv_1.6.6 Matrix_1.5-1 pkgconfig_2.0.3 listenv_0.8.0
[26] purrr_0.3.5 xtable_1.8-4 patchwork_1.1.2 scales_1.2.1 RANN_2.6.1
[31] later_1.3.0 Rtsne_0.16 spatstat.utils_2.3-1 tibble_3.1.8 generics_0.1.3
[36] ggplot2_3.3.6 ellipsis_0.3.2 ROCR_1.0-11 pbapply_1.5-0 SeuratObject_4.1.2
[41] lazyeval_0.2.2 cli_3.4.1 survival_3.3-1 magrittr_2.0.3 mime_0.12
[46] future_1.28.0 fansi_1.0.3 parallelly_1.32.1 MASS_7.3-57 ica_1.0-3
[51] progressr_0.11.0 tools_4.2.1 fitdistrplus_1.1-8 data.table_1.14.2 lifecycle_1.0.3
[56] matrixStats_0.62.0 stringr_1.4.1 plotly_4.10.0 munsell_0.5.0 cluster_2.1.3
[61] irlba_2.3.5.1 compiler_4.2.1 rlang_1.0.6 scattermore_0.8 grid_4.2.1
[66] ggridges_0.5.4 RcppAnnoy_0.0.19 htmlwidgets_1.5.4 igraph_1.3.5 miniUI_0.1.1.1
[71] gtable_0.3.1 codetools_0.2-18 reshape2_1.4.4 R6_2.5.1 gridExtra_2.3
[76] zoo_1.8-11 dplyr_1.0.10 fastmap_1.1.0 future.apply_1.9.1 rgeos_0.5-9
[81] utf8_1.2.2 KernSmooth_2.23-20 stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[86] sctransform_0.3.5 vctrs_0.4.2 png_0.1-7 tidyselect_1.2.0 lmtest_0.9-40
Thank you so much!
I tried to find out what the problem could be. I had hope that the installation of RTools42 may work but that does not make it better. The error still occurs.
Issue occurred for me as well after upgrading to R-4.2.1. Following steps helped me resolve the issue:
Restart the computer after successful installation of R Tools
Run following commands
install.packages('spatstat.data')
install.packages('spatstat.core')
After RTools wraps up it's compilation as mentioned in answer by Maso Sato
Library(Seurat) should load fine!
I had a similar problem with my installation of R, RStudio, and Seurat today (2022/10/26).
(I did not have a problem on another computer a few weeks ago).
install.packages('Seurat') said that I should install RTools.
I did so, and I got a similar error messages as yours when executing library(Seurat).
Then, I executed install.packages('spatstat.data').
RTools had to recompile various things (gcc), but at the end, library(Seurat) ran smoothly.
I'm trying to install some packages within Rstudio on my windows computer but I encounter some problems.
When I type in:
install.packages("dplyr")
I get the following error:
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
internet routines cannot be loaded
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
internet routines cannot be loaded
Warning in install.packages :
package ‘dplyr’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
internet routines cannot be loaded
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
internet routines cannot be loaded
I've also tried to install packages in the following way:
> install.packages("C:/Users/NLFERM/Downloads/dplyr_1.0.4.tar.gz", repos = NULL, type = "source")
But here I also get an error:
ERROR: dependencies 'ellipsis', 'generics', 'glue', 'lifecycle', 'magrittr', 'R6', 'rlang', 'tibble', 'tidyselect', 'vctrs' are not available for package 'dplyr'
* removing 'C:/Users/NLFERM/Documents/R/R-4.0.4/library/dplyr'
Warning in install.packages :
installation of package ‘C:/Users/NLFERM/Downloads/dplyr_1.0.4.tar.gz’ had non-zero exit status
I already reinstalled R studio and made sure that I have the newest version of R on my computer. Does anyone know how to fix this problem?
Kind regards
Does this work in your R base?
Otherwise are you connected to internet? Or over an enterprise network where cran websites are not accessible?
I have the lmerTest package installed, but it masks some of the lme4 functions and it loads automatically when I start a specific project.
I have tried deleteing the package but now I just get an error:
Loading required package: lmerTest Error in .requirePackage(package) :
unable to find required package ‘lmerTest’ In addition: Warning
message: In library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, : there is no package called ‘lmerTest’
Every time I open Rstudio it attempts to load the lmerTest package. The error message repeats ten times.
I have checked the Rprofile file but it is not in there.
This seems to be the same problem:
https://support.rstudio.com/hc/en-us/community/posts/200798587-How-can-I-prevent-a-package-from-trying-to-load-at-startup-
The quick and dirty solution here is to delete (or 'hide') the .RData file from the folder.
In the terminal you could do the following, assuming the terminal is open in the working directory.
mv ./.RData ./.RData_old
This should get RStudio opening without that package loading but all your other objects will not be there either. If you still have the code used to create the objects, you'd just need to run through it again to create all the objects again.
I have been blithely using R for some time when suddenly I'm having trouble installing packages, specifically mfx. It appears to be downloading. But then when I input library(mfx), I get this: Loading required package: sandwich
Loading required package: lmtest
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Loading required package: MASS
Loading required package: betareg
Error in get(".packageName", where) :
cannot open file 'C:/Users/Mary Graybeal/Documents/R/win-library/3.2/modeltools/R/modeltools.rdb': No such file or directory
Error: package ‘betareg’ could not be loaded
As part of my efforts to resolve it, I uninstalled and reinstalled; no help there. I use RStudio, but the same thing happens in R, and so the problem is not RStudio. Am I overlooking something really obvious here?
You have to re-install the previous package, in this case MODELTOOLS
install.packages("modeltools")
Loading required package: MASS Loading required package: betareg Error in get(".packageName", where) : cannot open file 'C:/Users/Mary Graybeal/Documents/R/win-library/3.2/modeltools/R/modeltools.rdb': No such file or directory Error: package ‘betareg’ could not be loaded
Maybe an another errors appear, you have to do the same step with each package.
When I tried to generate with yo jhipster on Windows 7 32 bits machine, I got the below error:
bower json3#~3.2.5 progress received 3.7MB of 4.9MB
downloaded, 75% libjpeg-62.dll: downloading [===================]
100% 0.0s
? pre-build test failed, compiling from source...
d:\Self_jhipster\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\
lib\check.js:19
throw new Error('building is not supported on ' + process.platform);
^ Error: building is not supported on win32
at d:\Self_jhipster\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\lib\check.js:19:10
How to solve this error?
I'm the author of http://jhipster.github.io/ which is the generator your are referring to.
I have found your problem, it is indeed a bug in jpegtran-bin. I have updated all the dependencies in Grunt.js, and it should now work fine on Windows.
This will be commited in the next release (0.2.1), which should be out in a few hours.
You can also submit a bug at https://github.com/jhipster/generator-jhipster/issues
After google with more correct keywords, the solution from https://github.com/gruntjs/grunt-contrib-imagemin/issues/109 works for me.
In application's package.json, add "jpegtran-bin": "0.2.0" before
the reference for imagemin,
Remove node_module folder locally.
Run npm install again.