Questions tagged [r]
R is a free, open-source programming language and software environment for statistical computing, bioinformatics, and graphics.
1,449 questions
4
votes
1
answer
29
views
R Chart Overlay data
I have some data in a CSV that pertains to bandwidth tests, like so:
Date.Time
Mean
Standard.Deviation
2025/12/24 12:06:46
88382
6046
2025/12/24 12:22:59
93813
3986
2025/12/24 13:36:06
91530
8136
2025/...
3
votes
1
answer
689
views
Look for previous date in dataframe that has certain column category in R
I have the following data frame:
...
1
vote
1
answer
309
views
Condense matrix of values into one column?
I have a dataset where I have unnecessarily duplicated column variables that I want to condense down. I wish the output wasn't so clumsy and I've already had to do some work to transform it and make ...
1
vote
1
answer
1k
views
130
votes
15
answers
122k
views
Python vs R for machine learning
I'm just starting to develop a machine learning application for academic purposes. I'm currently using R and training myself in it. However, in a lot of places, I have seen people using Python.
What ...
2
votes
1
answer
366
views
Calculate importance of input data bands for CNN image classification?
I constructed and trained a convolutional neural network using Keras in R with the TensorFlow backend. I feed the network with multispectral images for a simple image classification.
Is there some way ...
3
votes
1
answer
379
views
Missing population values in census data
I have population data from Census.gov:
Total US population by age by year from 1940 through 2010
Depending on the range of decades, the data is missing discrete population values for ages greater ...
1
vote
1
answer
76
views
Is there a way to combine both ties (nondirected edges) and wins/losses (directed edges) in a single social network?
I'm currently building social networks for small colonies of animals which I've observed, with the aim of comparing changes in social network structure in response to changes in certain environmental ...
2
votes
1
answer
7k
views
R Studio - grepl compare a column in a dataframe to a list of pattern
I have a column named "MATCH" in a dataframe and a list of patterns named "PATTERN".
...
1
vote
1
answer
810
views
0
votes
1
answer
46
views
lookup tables with multiple (possibly partly empty key columns) - prefer specific match over general one
Assume I have a table with samples:
ID
sample type
origin
project_l1
project_l2
project_l3
...
1
DNA
Blood
p1
p1.1
p1.1.1
p1...
2
DNA
Blood
p1
p1.1
p1.1.2
p1...
3
DNA
Blood
p1
p1.1
4
DNA
Blood
p1
p1.2
...
1
vote
1
answer
410
views
Importing Excel format data into R/R Studio and using glmnet package?
I have no problem importing Excel formatted data into R/R Studio and use all other R packages that I use. But, when I want to use the glmnet package to develop a regularization model, I invariably ...
0
votes
1
answer
6k
views
How to change line type in legend in ggplot in R
I have an issue with the "ggplot2"-package, where I cannot get the linetypes in the legend.
The legnd only shows the color of each line, but not the specific type.
My code looks like:
<...
0
votes
1
answer
446
views
How do I calculate a similarity matrix with a Student-t kernel?
As the title says, how do I calculate a similarity matrix with an un-normalized Student-t kernel? I'm attempting to calculate Kullback-Leibler divergence for different t-SNE runs, but need a Q-matrix ...
1
vote
1
answer
56
views
Which statistical technique should I use for a within-person repeated measures study?
I have collected all my data for a study and need to run my analysis but have come unstuck (I should have planned better beforehand I know).
I'm looking to see whether personality traits (five trait ...