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

Can you loop through or map 3+ different data sets and find 3+ different...

I have a simple non-linear example listed below that properly calculates 1 data set perfectly using the ROI package. In the code, I am filtering on CompanyA only. The goal is to minimize total cost by...

View Article


How to manually create box plots in R with two categories on x-axis

I have seen very similar questions but none that quite fit exactly what I am trying to do. I have the following RWE:n1 = 177 avg1 = 7.508192 sd1 = 5.439677 error1 <- qnorm(.975) * sd1/sqrt(n1) avg1...

View Article


Image may be NSFW.
Clik here to view.

How to split a polygon by a straight line on a graph?

I have been struggling with this for quite a while. I have found some similar questions here but all of them seemed like an overkill for this particular problem. I have two partially overlapping...

View Article

sankeyNetwork through renderUI disappears when applying JScode to remove...

I have a Shiny app that creates a sankeyNetwork from the networkD3 package which accepts inputs to update the data used for the network and also resizes itself based on the number of nodes present. I...

View Article

use both barmode 'group' and 'stack' in R-plotly

consider the following code in R (not in python):library(plotly) Animals <- c("giraffes", "orangutans", "monkeys") SF_Zoo <- c(20, 14, 23) LA_Zoo <- c(12, 18, 29) SF_Zoo2 <- c(24, 18, 29)...

View Article


Filter dataframe based on presence of sample in a seperate list

I am wanting to filter a dataframe with 1212 so it only contains that samples listed in a seperate list. The list has multiple values and I can't work out how to do this.df = RNASeq2RNASeq2Norm_samples...

View Article

R Shiny: remove newly created tabs

I'm writing a shiny app in which I want the user to be able to add and remove tabs. I know how to add tabs if the user clicks on a tab specifically made for that (thanks to the answer here) but I can't...

View Article

write different size vector into file row by row

I am the beginner of R language. I want to write different size vector into csv. Here is code:library(igraph) library(DirectedClustering) my_list = readLines("F://RR//listtest.csv") eigen <-c()...

View Article


ifelse statement to compute if value is greater than its previous value

I am trying to compute the change from the previous day for each group.Say I have these observations: cat var1 var2 date 1 male 172 68 2011-01-01 2 female 61 141 2011-01-02 3 female 211 208 2011-01-03...

View Article


Calculation expected shortfall of a distribution in R?

I tried to calculate the expected shortfall of my modified distribution function. I used "PerformanceAnalytics" package.Fx=c(0.02469009, 0.07225651, 0.11750310, 0.16054298, 0.20148378, 0.24042788,...

View Article

Day of week in R [duplicate]

This question already has an answer here:Find the day of a week 7 answersI have a date in R and it's formatted as follows:2018-08-31 01:00:00Is there any way in R to add another column with the day of...

View Article

How to perform web scraping to get all the reviews of the an app in Google Play?

I pretend to be able to get all the reviews that users leave on Google Play about the apps. I have this code that they indicated there Web scrapping in R through Google playstore . But the problem is...

View Article

How to plot an XTS that contains the return of 4 stocks?

This is my codelibrary(ggplot2) library(quantmod) library(xts) library(magrittr) start <- as.Date("2012-01-01") end <- as.Date("2019-10-01") getSymbols(c("AAPL","MSFT", "GOOG","INTC","AMD"), src...

View Article


Shinydashboard bookmarking does not bookmark the active tab if the tab is...

When a bookmarked shinydashboard with multiple tabs is loaded, the previously active tab should be active again on load - i.e., if the dashboard has 2 tabs and the bookmark button is on tab 2, tab 2...

View Article

Reproduction of Stata design of a national multi-staged sample in R survey...

I have a 3-stage stratified sampling design of a national survey. I have a code in Stata to do the weighting, but I struggle to reproduce it with R survey package. Sampling design is the following. The...

View Article


How can I make a dockerized Shiny app in a flexdashboard wrapper with golem?

Is it possible to make a shiny app with flexdashboard as a package with the Open Analytics golem package? Is it possible to dockerize it afterwards? How is the workflow going from the flexdashboard...

View Article

Dockerfile for minimum image size on R-base

I'm trying to minimize the size of my docker image. It's on R-Base from the rocker project. It needs to be as small as possible, since it is used as a container instance in a cloud based workflow.The...

View Article


How I can divide this array into columns in R

I want to divide this array into different columns using the character "|" like separator....

View Article

Is there a way to pull price data in R using an equities ISIN or SEDOL using...

I am attempting to pull price data for a bunch of international equities using tq_get in the tidyquant package but am having issues pulling the data based on the ticker, since the data I have only has...

View Article

Set different width for columns in a two-columns layout R markdown pdf document

I have to generate a pdf from a R markdown document, and the layout should be divided in two different columns. I managed to split the layout in two columns through the multicol package following these...

View Article
Browsing all 205278 articles
Browse latest View live


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