Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 206180 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Is there any function to separete the marker click on shiny leflet

I have plotted some marker point according to my dataset[lag, lat,asset_id]. The objective is to, when clicking on the marker points, input$layput_marker_click should return the corresponding asset_id...

View Article


Image may be NSFW.
Clik here to view.

Density plot for multiple group shows one line, however legend shows 3

I am analyzing US election data volume from Google trend. I type the below command in R studio.The poliData dataframe contains the SearchVolume for all months for three Politicians.ggplot(data =...

View Article


Image may be NSFW.
Clik here to view.

`README` badges not getting rendered properly in `pkgdown` website

I have thus far created 6 different pkgdown websites for my R packages (e.g., ggstatsplot, kittyR, etc.) and none of them ever had the following issue. For the first time, running the following command...

View Article

Replicate ggplot2 chart with facets and arrow annotations in plotly

I want to replicate a ggplot2 chart in plotly, to that end I have tried to use the ggplotly function. The chart is the following (p_arrow):library(data.table) library(ggplot2) library(plotly) dset...

View Article

how to use syntax in geom_polygon?

sorry for the question, I am still new in this. I found a nice code in the internet which shades areas between graphs with polygon (I cannot use geom_ribbon). I have to rewrite it into the ggplot...

View Article


R nested for-loop only producing result with last column in dataframe

CONTEXT:I'm working with respondent-level survey data. Each row of my data frame represents an individual person's survey responses.My data frame consists of individual-level utility estimates from a...

View Article

R data.table - best option for Cartesian join

I am looking for simple syntax for data.table's cartesian join e.g. I am using as below to get 1024 row in c_join but it requires to convert data.table to data.framed1 <- data.table(mtcars)d2 <-...

View Article

Shiny: updateSelectInput is blank after uploading data

I have a Shiny app that users upload a .txt file to and which users can then use to create a plot. The plot is conditional on the users selecting inputs based on the column names of their uploaded...

View Article


Can you Recommend an R Tutorial on Parallelization RAM Management

I write in R. I'm using the future.apply package for CPU parallelization on a linux machine. My code is currently RAM limited (vs. CPU core limited). I load all necessary input data prior to...

View Article


Standard deviation plot in R

I'm trying to create sd plot but really can't do this. What am I doing wrong? data_iris %>% mutate(st_dev = sd(Petal.Length)) %>% ggplot(., aes(x=Species, y=Petal.Length)) + geom_line() +...

View Article

How to calculate the average absolute difference between any two scores from...

I have a vector of n scores in an arbitrary order and want to calculate the average absolute difference between any two scores. Note, although I may not be using the correct term with "average absolute...

View Article

Median statistical difference in ggplot

I have a ggplot boxplot like this one:library(ggplot2) data(iris) ggplot(iris, aes(x = "", y = Sepal.Width)) + geom_boxplot() As you can see the median is 3. Say the real value is 3.8 what I would like...

View Article

How to solve ordinary differential equations with time dependent parameters...

I am trying to replicate an existing mathematical model in order to get "control" data for an independent research project. Link to article.I want to solve a system of five ordinary differential...

View Article


Shiny observeEvent in dynamically created secondary table

I've used an observeEvent to catch when a user clicks in a table row and get the row id in order to display a new tab with a drill down of the data for the selected category. I want to be able to do...

View Article

How to use function RNN in R for demand forecasting

I have been trying to construct a recurrent neural network in R for time series demand forecasting. Keras/tensorflow are just too confusing to use in R so I have tried the rnn package (trainr function)...

View Article


Finding which elements in a vector have an edit distance of one and the same...

I have a dataframe, an example in .csv format is shown below, that has a list of words (Word), the number of sounds in those words (NumSounds), and the transcription of the sounds in each word...

View Article

Pattern fill in mapview?

Is it possible to fill polygons with patterns (ex. diagonal lines) instead of colour using mapview? My searching hasn't turned up anything. Here's an example that produces colour-filled...

View Article


Image may be NSFW.
Clik here to view.

Efficiently plotting millions of data points in R

I'm trying to plot some million data points in R. I'm currently using ggplot2 (but I'm open to suggestions of alternate packages). The problem is that the graph takes too long to render (often upwards...

View Article

Need help in writing such a code in R without using any packages

Write a function that takes a number of inputs (p) and size of a subset (k) and outputs a matrix where each row is a vector of TRUE/FALSE values (k TRUE entries, p - k FALSE entries) and together the...

View Article

R: Named lists and description lists

R has two classes not so commonly used: "Dlist" and "namedList".As regard the first, it is mentioned with respect to Sys.getenv(), which returns a result of class "Dlist" if its argument is missing,...

View Article
Browsing all 206180 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>