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

R Markdown: openBinaryFile: does not exist (No such file or directory)

I've developed a shiny app that allows user to download a HTML report via R Markdown. I'm trying to include custom css and images into my rmarkdown file. However, I keep getting this error...

View Article


Load multiple packages at once

How can I load a bunch of packages at once with out retyping the require command over and over? I've tried three approaches all of which crash and burn.Basically, I want to supply a vector of package...

View Article


R: dropping all observations within a group

I have a set of 500 firms with investment data over six years. I want to create a balanced panel of ONLY the firms that have data for all six years, but I can't seem to find an easy way to do this in...

View Article

How to put web scraped numbers into a data frame that adds to the data frame...

I want to create a data frame that updates each time my script is run. I want one column to have the number and the other to have the date that it was recorded. Here is what I have so far.# Packages...

View Article

How do you add a column to a univariate zoo series?

Suppose I have a univariate zoo series:v <- read.zoo(data.frame(dt=c(as.Date('2019-01-01')+1:10), vals=1:10)) v 2019-01-02 2019-01-03 2019-01-04 2019-01-05 2019-01-06 2019-01-07 2019-01-08...

View Article


How to create a table that calculates percent change between values in two...

I have two data tables, each representing the monthly spread in one year and the same in the next. I would like to calculate the % change in values based on my index ('Category Name') so each row value...

View Article

Is there a way in R to detect how often a package is used?

Recently, I found that there are many packages that I don't use much, and some of them may never be used again. I would like to delete these packages, but I am worrying that some packages that I often...

View Article

R Tidy : Dynamic Sequential Threshold

I'm trying to find a tidy way to dynamically adjust a threshold as I "move" through a tibble using library(tidyverse). For example, imagine a tibble containing sequential observations:example <-...

View Article


Creating a Leaflet Map in Shiny Using Multiple Years From Different Columns

I am trying to create a map where users can select to view trail count data from a list of trailheads by year. I have figured out to do a single year, though not elegantly, and am now trying to include...

View Article


How to read in more than 250,000 characters XML CLOB field from Oracle into R...

I need to read in this XML COLB column from Oracle table. I tried the simple read in like below:xmlbefore <- dbGetQuery(conn, "select ID, XML_TXT from XML_table") But I can only read in about...

View Article

Error Warning: Error in :: argument of length 0 in Shiny App for...

This Syntax for server and i have error on this. i have problem on showing output to shiny app also error found 99: renderPrint [C:\Users\TheBlackIZ\Documents\Simple GUI\GUIfix/server.R#66] 98: func...

View Article

Replace value in a column with 'blank' if it matches the value in another column

I have a following data set as a data frame within R article_number 1st_cutoff_date 2nd_cutoff_date abc 12/01/2019 01/14/2020 def 02/10/2020 02/10/2020 What I want to do is in cases where...

View Article

Is there a way to change the absolute path of file_in inputs to drake without...

For my project, sometimes restructuring, or simply changing the mount point of my project data directory is required (Eg - Upgrading to catalina and no longer being able to have non-standard...

View Article


Image may be NSFW.
Clik here to view.

How do I manually assign the location of bars along the x-axis using barplot()?

I have a list of means. means=c(anc3mean,l3mean,anc5mean,l5mean,anczmean,z12mean);means [1] 0.07025897 0.42328670 0.05697524 0.53915431 0.01893219 0.10878638 I have created a barplot from those...

View Article

Image may be NSFW.
Clik here to view.

plot geom_point on top of geom_histogram

I have a dataframe:test <- structure(list(Sample_ID = c("S1","S2", "S3", "S4", "S1", "S2", "S3", "S4"), CN_Region = c("A", "A", "A", "A", "B", "B", "B", "B"), MedianLog2Ratio = c(-0.2, -0.2, -0.25,...

View Article


Machine learning project: split training/test sets before or after...

Is it best to split your data into training and test sets before doing any exploratory data analysis, or do all exploration based solely on training data?I'm working on my first full machine learning...

View Article

How Can I build a running tally of cumulative multiplied elements in r?

I am working with a large data frame and I need/want to use more efficient code.This is my starting point:library(data.table) dt<-data.table(Customer = c("John","Sally","Michael","David"),...

View Article


R chain assignment creates 'quantum entanglement' of newly-created columns,...

Quantum entanglement phrasing obviously a little tongue-in-cheek but you'll see what I mean.If one creates multiple data.frame columns using chain assignment, those columns all behave as one later,...

View Article

How to deploy R shinydashboard with menuSubItem not collapsed by default

Below is some simple sample code for shinydashboard with various subMenuItem objects under a menuItem. By default, when the app is deployed the subMenuItems are collapsed. Is there a way to set it so...

View Article

How to pass in functions as arguments in Rcpp / C++?

I'm trying to write a function which can take in functions as its arguments in Rcpp. I have written an example function in R that shows the kind of functionality that I'm aiming...

View Article
Browsing all 206180 articles
Browse latest View live


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