Questions tagged [r]
R is a free, open-source programming language & software environment for statistical computing, bioinformatics, visualization & general computing. Please use minimal reproducible examples others can run using copy & paste. Show desired output entirely. Use dput() for data & specify all non-base packages with library(). Don't embed pictures for data or code, use indented code blocks instead. For statistics questions, use https://stats.stackexchange.com.
508,290
questions
1
vote
0
answers
15
views
Sommer Package: mmer prediction error because of singular matrix
I am running a GxE mixed model in Sommer, with the environments as a fixed factor and genotypes as a random factor with a GRM as covariance structure (G_GY). For the interaction term, the covariance ...
1
vote
0
answers
23
views
How to load local csv files into shinyLive code block within a Quarto document?
I want to create a quarto document that contains a code block that uses shinyLive to run an interactive graph.
At the moment, all the examples I have seen are either:
using R's inbuilt dummy data
or, ...
0
votes
0
answers
37
views
Why is my Shiny app not generating a plot?
I am attempting to generate a plot using variables in my server code that can be changed- I'm not sure if I am formatting this wrong and that is why a plot is not generating. My goal is to generate a ...
-1
votes
0
answers
21
views
Create a layered ggplot with 2 different scale x axis? [duplicate]
I'm a litte stuck, I wanna create a plot showing 2 variables based on time, however one of those variable needs to be shown on a log scale (going from 0.01 to 100), and the other one on a regular ...
0
votes
0
answers
16
views
Failing to load a data from bloomberg [closed]
I'm new to R. And I want to transfer data from Bloomberg, how can I do this, because csv does not work and my version is 4.4.0
I'm new to coding in R. Check what I did here (during an online course in ...
4
votes
0
answers
50
views
When extending ggplot2, how should I apply scaling functions per group instead of as a whole?
I'm working on a new geom for ggplot2 that allows the user to alter the tint and shade of the colors by mapping it to an aesthetic. (If someone knows of a place this has already been implemented, ...
2
votes
3
answers
48
views
How to conditionally deactivate or remove selection items in the rhandsontable context menu?
In running the below simplified code, the user can add or remove table rows by right-clicking on a row which, through the rhandsontable package context menu, generates a pop-up of action choices. In ...
0
votes
0
answers
34
views
find value from dfa in dfb$col1 and report corresponding value in dfb$col2
I have two large dfs:
lookup_val <-c(30911003,23284867,31383855)
other_dat <-c(D,E,G)
dfa <- data.frame(lookup_val,other_dat)
dfb <- data.frame(returnme = c(100,200,300,400,500),
...
-2
votes
0
answers
24
views
Experiencing error when trying to use lapply() on my data frame [closed]
I've gotten an error that looks like this :
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'Lions' of mode 'function' was not found
and I'm not quite sure how ...
0
votes
0
answers
12
views
dispersion.cutoff and mean.cutoff don't seem to work at all with FindVariableFeatures()
I'm doing spatial single-cell analysis on CosMx databases and I've run into a problem when using FindVariableFeatures(). I have only 960 genes in total so I wanted to plot the variable genes and ...
0
votes
1
answer
32
views
How to inversely transform time series predictions to add seasonality back in? [closed]
I have transformed some data to make it stationary before fitting an ARIMA(1,0,1) model.
I specifically want to manually transform the data to better understand the process.
I can successfully fit a ...
0
votes
0
answers
6
views
Error in connection querying MotifDb in R
I don't understand why some days ago this line was working
MotifDb [grep ('TWIST1', values (MotifDb)$geneSymbol, ignore.case=TRUE)]
Hsapiens_TWIST1 <- query(MotifDb, "TWIST1")
while now ...
0
votes
0
answers
32
views
html_nodes always return {xml_nodeset (0)}
I'm trying to scrape this page with the rvest R package: https://www.bienici.com/recherche/achat/dessin-669cc780ec9a6600b7687ce8/2-pieces?prix-max=260000&surface-min=40&surface-max=55&neuf=...
3
votes
3
answers
92
views
How do I convert milliseconds to minutes and seconds?
I want to convert milliseconds values in my data to minutes and seconds (in the format MM:SS e.g. a value of 1772094 should become 29:32).
The toy data looks like this:
df <- data.frame(
ID = c(&...
3
votes
0
answers
42
views
Is there a way to impose a time limit on a chunk of R code even though a part of the code is running in C?
I have a part of a function which later runs in a loop and I want to impose a time limit on a part of this function. It should return NAs in case the time limit is exceeded to prevent my whole program ...