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

Adding significant stars' row with existing output in R

I got column means and range(min, max) from my data. df=matrix(c(3, 5, 2, 3, 6, 3,4, 4, 4, 5, 4, 3,5, 5, 5),ncol=3,byrow=TRUE) colnames(df)<-paste0("ch", 1:ncol(df)) rownames(df)<-paste0("G",...

View Article


Incorporating Shiny into Flexdashboard for dynamic textInput with the least...

I have built a static Flexdashboard with 10+ tabs and multiple plots in each tab. I set a variable as a search key for each evaluated individual to knit the entire dashboard. For...

View Article


How to check in R that the random variable Y "cumulative distribution...

I want to check the "probability integral transform" theorem using R. Let's suppose X is an exponential random variable with lambda = 5. I want to check that the random variable Y = F_X = 1 - exp(-5*X)...

View Article

R code error: Please provide variables names in impulse that are in the set...

I am trying to generate impulse response function for my VECM ,but the system is throwing an error that says Please provide variables names in impulse that are in the set of endogenous variables.How...

View Article

How to use same R markdown source to go to HTML, Word, github markdown, and PDF

I am trying to render the same R markdown source document to MS word, git-hub markdown, HTML, and PDF. Options for the compilation are in the header of the .Rmd file, and the choice of output is...

View Article


How do I use sample function for bootstrapping in R? Replacement row problem

I am trying to create a bootstrap for the data frame 'ev_all_clean'set.seed(1315) boot_s <- as.data.frame(matrix(NA, ncol = 19, nrow = 1000)) for(k in 1:19){ for(l in 1:1000){ boot_s[l,k]<-...

View Article

What does "S3 methods" mean in R?

Since I am fairly new to R, I do not know what the S3 methods and objects are. I found that there are S3 and S4 object systems, and some recommend to use S3 over S4 if possible...

View Article

Image may be NSFW.
Clik here to view.

Conditional Mean Prediction of Unknown Values in a Lag Embedding

I wish to implement the algorithm from the paper: Singular Spectrum Analysis With Conditional Predictions for Real-Time State Estimation and Forecasting in R. I'm having trouble with Step 2 of the...

View Article


All combinations of elements of vectors at varying length with conditions to...

Imagine that we have three vectors:v_1 = c("a", "b", "c", "d") v_2 = c("e", "f", "g") v_3 = c("h", "i") I'd like to use R to retrieve a complete list of all combinations of these three vectors for all...

View Article


Image may be NSFW.
Clik here to view.

R ggplot barplot: spacing between dodged bars is not consistent

My ggplot code looks like:ggplot (data = mosa, aes (x = condition, y = perc, fill = pheno, colour = pheno)) + geom_bar (stat = 'identity', width=0.6, position=position_dodge(width=0.7), size=1.1) For...

View Article

Get a custom button label in an excel file

I am trying to get the label of a custom button in a excel file, but I do not know which library to use and how to use it. Currently I use an openxlsx library but in the excel file I get all the code...

View Article

How to load CSV file with https:// on shinyapps?

I would like to load a csv-File from a https url and store it in a data frame.On my local Windos it works without any problem, but as soon as i upload it to shinyapps.io i don't get the proper data out...

View Article

Microsoft R Open: Fail to install from Github, Error in utils::download.file

I'm trying to use MRAN as alternative to CRAN, reason is I want to take advantage of Intel MKL.However I can't seem to install any libraries from Github.For...

View Article


In flexdashboard I want to make a year input slider but I'm getting an error...

In my dashboard I want to create a year range input slider. But I'm getting the following error:Tibble columns must have consistent lengths, only values of length one are recycled: * Length 0: Columns...

View Article

How to create an R function programmatically?

Hadley Wickham recently asked an interesting question on the r-devel mailing list, and being unable to find an existing question on the topic on StackOverflow, I thought it might be useful for it exist...

View Article


combining lists inside a function returns zero results when using lapply and map

I have some data which looks like the following:# A tibble: 41 x 5 time ID Value var1 out2 <date> <chr> <dbl> <dbl> <dbl> 1 2016-12-01 CAT1 0 0 0 2 2016-12-02 CAT1 0.00345...

View Article

Pivot by group for unequal data size

I have the following DF:DF = structure(list(ID = c(21785L, 21785L, 21785L), V1 = c(0.828273303, 6.404590021, 0.775568448), V2 = c(2L, 3L, 2L), V3 = c(NA, 1.122899914, 0.850113234), V4 = c(NA, 4L, 3L),...

View Article


how to get the id of a span in dynamic output in shiny

I can get the id of a span element in Shiny using js thanks to Stephane but not if the element is produced dynamically (indeed the contents of the dynamic elements are not contained in the source code...

View Article

How to delete rows for leading and trailing NAs by group in R

I need to delete rows containing NA, but only if they are leading(trailing) i.e. before(after) any data appears for a variable. This is very similar to: How to find (not replace) leading NAs, gaps, and...

View Article

Receiving error: argument of length 0 when reading in separate tables from...

Error in 1:nrow(csvs) : argument of length 0 when reading in separate tables from multiple csv filesI am trying to perform the following for loop on separate tables read in from multiple csv files in...

View Article
Browsing all 205847 articles
Browse latest View live


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