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

Passing different arguments to function for each dataframe in a list

Here's a simplified example of my data:I have a list of dataframesset.seed(1) data1 <- data.frame(A = sample(1:10)) data2 <- data.frame(A = sample(1:10)) data3 <- data.frame(A = sample(1:10))...

View Article


R: Is there a way to search for a nearly identical row?

This is my original problem: How would I be able to remove opposite values (e.g. refunds) in panel data?Given the following data:id|datee | price | quant | discrete_x 1 2018-12-19 4 -3000 A 1...

View Article


quantregForest setting seed

I am trying to run reproducible results with quantregForest but can't get the same results. Is there a way of setting the seed in this function?x <- matrix(rnorm(500), ncol = 10) y <- rnorm(50)...

View Article

How to remove a 'permission denied' file from folder within R

I am downloading a large xlsx file as a part of a function. This file is removed with file.remove() in linux and mac but I have permission denied in windows machines. Below is the code for my...

View Article

Writing grib1 files with R

I am manipulating some grib1 raster files in R and I have to write those rasters in the grib1 file format to the harddisk again. Is there a function to do so? I have checked the rNOMADS package but can...

View Article


Chronological order of clipping a Raster

This is just a query about clipping a raster using a spatial polygon data frame. When we are clipping a raster whether we should 'crop' first and then 'mask' or is it the other way around?Crop and Mask...

View Article

R language in Anaconda3: The packages is alrerady installed and in libpath...

I am new in R language. Today I have install a package and it is successful.and I have checked the .libPaths() folder and the package is there. but it always show the error 'here is no package called...

View Article

Another package is removing my S4 'predict' method from the autocompletion...

I'm writing an R package where I implement my own 'predict' generic and an S4 method for the signature 'apk', which is an S4 class inside my package as well. I'm using Rstudio as editor and generating...

View Article


How to add 3D-Buildings to Leaflet

I am trying to include the OSMBuildings plugin of leaflet into a shiny App. The buildings appear, but they are placed behind the basemap.You can see the buildings if you zoom in/out or if you remove...

View Article


Trace back - find if a string value occurs before another specific string...

I have a general problem in R. I wonder if there's a way to identify if a specific string value occurs after another specific string value within a group. The dataset is a time series. Each Group...

View Article

Image may be NSFW.
Clik here to view.

Calculating 0,1 in two different columns in R

I have a data (DAT) of ~30,000 subjects with several columns in the form of 0,1 and a 'Group' variable e.g.,I want to count how many subjects in group '2' are 1 in V1 and V5. How do I do it in R...

View Article

Image may be NSFW.
Clik here to view.

lambda.1se not being in one standard error of the error

In the documentation of the function cv.glmnet(), it is given that:lambda.1se : largest value of lambda such that error is within 1 standard error of the minimum.Which means that lambda.1se gives the...

View Article

How to install packages without updating the existing ones

I want to install R packages without updating the existing ones. for example, I am installing "dplyr", but it imports several others as given in the list below from the cran pdf....

View Article


How to select min or max values within one cell in R?

I have a data frame where for each sample the columns can have multiple values, for example:Gene Pvalue1 Pvalue2 Pvalue3 Beta Ace 0.0381, ., 0.00357 0.01755, 0.001385 0.0037, NA , 0.039 -0.03,1,15 NOS...

View Article

Error when updating/installing 'XML' package on R

I am unable to update XML package on my R from version 3.98-1.20 to 3.99-0.1, or to install it from scratch after removing. This is what I receive in RStudio console when installing XML from...

View Article


Select min or max values within one cell (delimited string)

I have a data frame where for each sample the columns can have multiple values, for example:Gene Pvalue1 Pvalue2 Pvalue3 Beta Ace 0.0381, ., 0.00357 0.01755, 0.001385 0.0037, NA , 0.039 -0.03,1,15 NOS...

View Article

Error in py_call_impl(callable, dots$args, dots$keywords) : ImportError:...

Using R 'reticulate' package, I am trying to run a Python code that uses the 'en_core_web_lg' module of Spacy, and I get this error. I looked around on other user's questions but I didn't overcome the...

View Article


using pickerInput in r shiny to apply function

I would like to be able to apply a function to a given set of columns from the RLdata10000 dataset. I have been going through shiny tutorials and am attempting to learn how to use observeEvent and...

View Article

dplyr::add_row to nested tible in tidyr 1.0.0

In a former version of tidyr I was able to add rows to a nested tibble using dplyr::add_row. After updating to version 1.0.0 I get the following error:Error: levels.vctrs_list_of() not...

View Article

Reducing a network by appending strong links to the spanning tree

I am trying to reduce a full graph so that it only shows the strongest links.To do that I am doing this:Multiply the original matrix by -1 (the values are in the interval [0,1])Obtain the minimum...

View Article
Browsing all 206180 articles
Browse latest View live