Questions tagged [ropensci]

R packages created by the organization R Open Science (rOpenSci for short) that interact with scientific data repositories, journals, and providers of scientific metrics.

We develop open source R packages that provide programmatic access to a variety of scientific data, full-text of journal articles, and repositories that provide real-time metrics of scholarly impact. Visit our packages section for a full list of production and development versions of packages.

63 questions
15
votes
2 answers

dynamically adjust height and/or width of shiny-plotly output based on window size

I would like to have the shiny-plotly output height and width adjusted to the current window size. I have tried to use the below but of no use. ShinyUi <- fluidPage( # Application title titlePanel("title"), sidebarLayout( sidebarPanel( …
Prradep
  • 5,506
  • 5
  • 43
  • 84
8
votes
3 answers

How to search PubMed or other databases using R

I have recently been using the excellent rplos package, which makes it very easy to search through papers hosted on the Public Library of Science (PLOS) API. I've hit a snag, in that the API itself seems to have some missing information - a major…
lukeholman
  • 595
  • 6
  • 14
7
votes
1 answer

subcomponent(mode = "in") for multiple source vertices

Question In the igraph R package, is there an efficient implementation of subcomponent() and/or BFS that can handle multiple source vertices? Motivation The drake R package models a user's workflow as a DAG of interdependent objects and files. The…
landau
  • 5,636
  • 1
  • 22
  • 50
7
votes
3 answers

Convert features of a 'multifeature' GeoJSON into R spatial objects

Normally you can read geojson files into R with trusty readOGR, as illustrated here. However, this fails for multifeature geojsons. Reproducible…
RobinLovelace
  • 4,799
  • 6
  • 29
  • 40
6
votes
0 answers

Lock environment but not .Random.seed

Is it possible to lock the global environment and still allow .Random.seed to be set or removed? The default behavior of lockEnvironment() is too aggressive for my use case. lockEnvironment(globalenv()) rnorm(10) #> Error in rnorm(10) : cannot add…
landau
  • 5,636
  • 1
  • 22
  • 50
6
votes
3 answers

Subsetting geojson data with R

I have a geojson file of state boundaries that I obtained from here. In particular I'm using the 20m US States Data I'm trying to subset the data so that I can use leaflet to map only certain states. I can subset a single state using: states <-…
Kactus
  • 142
  • 1
  • 11
6
votes
1 answer

ACM Digital Library access with R - No API so how possible?

I want to search ACM Digital library using R code, retrieving at least metadata including abstracts, and at best the full text. I know that the rOpenSci libraries provide R packages and functions to access IEEEExplore and other literature data…
smfrgsn
  • 141
  • 1
  • 6
5
votes
2 answers

Launch RSelenium Browser regardless of port open/closed

Question: Is there a function that will open a selenium browser if none is already open, or close the current browser and reset the port and relaunch a browser? Rationale: I work with big loops in RSelenium that occasionally crash, so sometimes I…
Neal Barsch
  • 2,810
  • 2
  • 13
  • 39
4
votes
1 answer

drake - map over ggplot targets to output them

First off, drake is just magical. I love the workflow of designing the dependency graph, and then executing it in one fell swoop. However, I ran into a roadblock. My workflow is simulating over large parameter grids, and then summarizing different…
ivan-k
  • 811
  • 1
  • 7
  • 20
4
votes
3 answers

R Shiny error: How to work with the click events incase of two plotly plots?

I have two plotly plots in a shiny dashboard. When I click on the first plotly plot, the interactive event is working fine. But when I perform the same operation on the second plot which is a stacked barplot, the window is closing automatically. Do…
Prradep
  • 5,506
  • 5
  • 43
  • 84
4
votes
1 answer

How to download geojson data and read it to R

# From http://leafletjs.com/examples/choropleth/us-states.js states <- geojsonio::geojson_read("json/us-states.geojson", what = "sp") bins <- c(0, 10, 20, 50, 100, 200, 500, 1000, Inf) pal <- colorBin("YlOrRd", domain = states$density, bins =…
Bin
  • 517
  • 1
  • 4
  • 15
4
votes
1 answer

Error when using install_github: 'exdir' does not exist

I am trying to install a package from github, but keep getting the following error; "Error in unzip(src, list = TRUE) : 'exdir' does not exist". I'm guessing that unzip doesn't have permission to create a directory to unzip into, but I don't know a…
andyteucher
  • 1,393
  • 14
  • 21
3
votes
1 answer

How can I add timestamp in osmdata_sf() results?

When I query osm data, I want to receive the timestamp, when some object was added or changed, is it possible to include this data? There is my query: q <- opq("London",timeout = 20000) %>% add_osm_feature(key = "landuse",…
vanhry
  • 31
  • 3
3
votes
3 answers

Convert scanned PDF to searcheable PDF (in R)

I'm trying to convert a series of scanned PDF into searchable PDF using the tesseract and pdftools packages. I've accomplished two steps. Now I need to write back to a searchable pdf. Read scanned PDF Run OCR Write back to a searcheable PDF eg <-…
Thomas Speidel
  • 1,369
  • 1
  • 14
  • 26
3
votes
2 answers

Is there any R function to extract all taxonomy name (phylum, class, order, family ...) from species taxonomic ID/ species name or genus name?

I have the taxonomic ID of species and I can get the species and genus name from NCBI (https://www.ncbi.nlm.nih.gov/Taxonomy/TaxIdentifier/tax_identifier.cgi). But I want phylum, class, order.. all from these data. I have tried taxize package, but…
Shaminur
  • 51
  • 6
1
2 3 4 5