Questions tagged [r-library]
33 questions
5
votes
1 answer
How to call predict for 3 different algorithms from same custom R package function?
I'm working on a custom R package (it is private, not hosted anywhere). In this package, I have a function that takes xgboost, RandomForest (from the ranger function), and glmnet models and uses them to predict on a new dataset.
Each time I'm…

matsuo_basho
- 2,833
- 8
- 26
- 47
4
votes
0 answers
Why have I lost ability to use mapshot
I've been using mapshot a lot to send interactive maps of data but recently, although I can make the maps I want with mapview, I can't save them.
Example:
map<- mapview(mapdata, zcol = "columnofinterest", burst = TRUE)
mapshot(map, url =…

Sissiboon
- 41
- 2
3
votes
1 answer
R - (ggplot2 library) - Legends not showing on graphs
What I'm doing
I'm using a library for R called ggplot2, which allows for a lot of different options for creating graphics and other things. I'm using that to display two different data sets on one graph with different colours for each set of data I…

Saemas
- 81
- 4
2
votes
1 answer
R - New libraries fail to install even though dependencies are there
I have a rather interesting problem that I cannot find the answer to. I am using a RStudio Server (v. 1.4.1717), and R version 4.1.0 is installed. I try to use Projects with renv and so far it had been quite okay, even though I had problems with…

Erkin Acar
- 53
- 4
2
votes
0 answers
Unable to access libraries in RStudio but not in R
I am facing a problem in RStudio when installing and using packages. I'm very very new to it so please bear with me while I describe it:
This is a new R and Rstudio installation in my PC, R version 4.1.2. For remote work due to life stuff. I usually…

Andrés R
- 21
- 1
2
votes
1 answer
Including rmarkdown text in flexdashboard (includeMarkdown does not work) (R)
I would like to include external markdown file; however, I could not handle it on RStudio so far. If I manually copy/paste the content of about.md into main.R, there is no issue. I mean setting up everything related with flexdashboard is fine. On…

ozturkib
- 1,493
- 16
- 28
1
vote
0 answers
package ‘ggplot2’ is not available for this version of R
Can't get the ggplot2.
I can post more data if you let me know what I should run, but here is the error and the version.
> library("ggplot2")
Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()),…

Mariana Schultz
- 11
- 1
1
vote
1 answer
R - %||% pipe operator
I'm trying to reuse snippets of code from the r-lib repository. I can't find where this particular pipe operator is defined:
getOption("usethis.description") %||% list()
Could anyone direct me to the source code for this pipe operator?

Dylan Russell
- 936
- 1
- 10
- 29
1
vote
1 answer
Import a package with only local side-effect
When writing tests, I sometimes want to check how R would react to conflicts.
For instance, my package contains a compact() function that conflicts with purrr::compact(), and I wrote some code so that this latter is still used on regular lists.
In…

Dan Chaltiel
- 7,811
- 5
- 47
- 92
1
vote
0 answers
R - 'for' loop initial declarations are only allowed in C99 mode when installing processx package on linux redhat distribution
I want to install the processx library because it is a required package for a BioConductor package I am using. I get the following error when using install.packages("processx")
Error
gcc -g -O2 -Wall tools/px.c -o tools/px
gcc -g -O2 …

Nolan Cole
- 11
- 1
1
vote
1 answer
remotes::install_github can't find a dependency that is present
Inspired by Miles McBain's drake video, I want to install the fnmate package/RStudio add-in. But remotes::install_github insists that I don't have magrittr, when in fact I do.
I use a site library configured in an environment variable, and, to try…

Gregor Thomas
- 136,190
- 20
- 167
- 294
1
vote
3 answers
'Misconfiguration in the system' error in local R Shiny app connected to Auth0 using the Auth0 library
I am trying to create a simple shiny app that is connected to the Auth0 password system using the Auth0 library. Currently, I am just trying to run locally. I get an Auth0 page that says 'there could be a misconfiguration in the system or a service…

Hattie35
- 99
- 8
1
vote
0 answers
Library loads with R but not with Rscript
I am getting the following error when I try to load a library in R using Rscript.
When I run
Rscript -e "library(coexpp)"
I get the following error
Error in x$.self$finalize() : expecting an external pointer
I am able to load the library, however,…

Veera
- 861
- 1
- 9
- 18
1
vote
1 answer
Why can't you have several version of a r-package in a given r-library
Is it possible to access several versions of the same package in a given library ? I see many projects online like miniCRAN or versions or cranium but they all allow the same thing which is allow a user to build a given version of a package.
My…

statquant
- 13,672
- 21
- 91
- 162
1
vote
0 answers
Error when loading needs library for the first time
I installed the package "needs" in R and am trying to load it for the first time.
When loading it, I tried to agree when prompted that I want needs() to install and attach any package(s) that is needed when running a script. However, R throws an…

Ulrich
- 43
- 4