510,522 questions
Advice
0
votes
1
replies
53
views
How to find name matches exact, partial or no match from two list
I need to match two name lists and identify if the record is found in another list with full, partial or no match and extract the row id for the match. For simplicity, the lists are unique but the ...
0
votes
0
answers
71
views
Loops in R are resetting values after each loop [closed]
I'm trying to use nested for-loops to get an average of distances between points. I've tried a couple ways of formatting this code block, but it always resolves instantly with no changes to my input ...
Tooling
1
vote
1
replies
73
views
Is it possible to have vscode activate a conda environment for building *without* using python?
I use vscode to write my manuscripts in Rmarkdown, with a makefile that builds the manuscript into a word doc, pdf, etc. In the past, I've used renv to manage package dependencies, but it occurred to ...
0
votes
0
answers
93
views
Problems with nops_fix()
I have a problem with nops_fix(). I installed the R packages as suggested (clipr, magick, qpdf). But when I run:
nops_fix("nops_scan_20260604161954.zip")
I see the first window to correct ...
Advice
1
vote
4
replies
97
views
Compute percentage of a variable per group of another in one line with collapse
I want to compute percentage of area per value of a grouping column.
df <- data.frame(
group = rep(c("A", "B", "C"), each = 3),
area = c(10, 20, 30, 15, 25, 5, 40,...
Advice
0
votes
1
replies
42
views
Mixed ANOVA in rstatix: Unexpectedly low degrees of freedom After NA Renovation
I am running a two-way mixed ANOVA using the anova_test() function from the rstatix package. My dataset is in long format, and I have one between-subjects factor (2 groups) and one within-subjects ...
-2
votes
3
answers
149
views
Don't understand mixedsort behavior when sorting timestamps
I have some timestamps to sort.
I need to get the most recent date.
Consider the following example:
> sort(c("2026-04-05", "2026-04-06"), decreasing=FALSE)
[1] "2026-04-05&...
0
votes
0
answers
82
views
I have a US state map with a file that consists of only two variables State as the region and frequency. But my map contains triangles [closed]
Here is my code, the input file has a variable called region which is the state and the second variable is frequency, which is the number of responses by state.
When I plot the data using this code, I ...
0
votes
0
answers
89
views
step_tokenfilter function crashes R session
I'm just trying to test out a tidy models approach for training a random forest on some text data. However, I get stuck on the text preparation and R keeps crashing for me when I try to prep a recipe. ...
2
votes
1
answer
114
views
Cannot integrate Leaflet plugin into R Shiny application
I would like to implement the leaflet-labeler plugin into a R Shiny application that renders a Leaflet map, but I have been making very little headway.
The GeoJson data is a point layer ...
Advice
0
votes
2
replies
88
views
Can anyone recommend any resources for trying to learn how to run Maxent models when I do not have a modelling or mathematical background?
I am currently a masters student whose project will involve using occurrence (presence only) and environmental data to try to predict the future distributions of a range of species under climate ...
Advice
0
votes
0
replies
66
views
weighted kappa from an incomplete design
I have a rater study that uses an incomplete design: I have 5 raters and a number of subjects, each subject is rated by 2 raters. I would like to get some sense about the level of agreement. I know I ...
2
votes
2
answers
244
views
Order of evaluation in piped expressions
I don't understand in which order piped expressions are evaluated.
Consider the following example:
f1 <- function(x) {
message("called f1")
paste0(x, "_f1")
}
f2 <- ...
1
vote
1
answer
90
views
quanteda finds string that don't match the regex
Consider the following example:
library(quanteda)
testcorpus <- c(
"I play the piano",
"He plays the piano",
"They played the piano",
"I play the ...
-3
votes
0
answers
148
views
What's the purpose of `body_add_gg`? [closed]
After this question, I don't understand what the purpose of body_add_gg is anymore.
Can't you just do this?
library(officer)
library(ggplot2)
plt <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width))...