Questions tagged [r]

R is a free, open-source programming language and software environment for statistical computing, bioinformatics, visualization, and general computing. Please provide minimal and reproducible example(s) along with the desired output. Use dput() for data and specify all non-base packages with library() calls. Do not embed pictures for data or code, use indented code blocks instead. For statistics related questions, use https://stats.stackexchange.com.

Filter by
Sorted by
Tagged with
-1
votes
0answers
7 views

R graphs legends

I have tried so many different things but I can not manage to make this kind of legends. Can someone provide some insight on them?
0
votes
0answers
10 views

Fisher's Test or chi-squared Test Rstudio

This question uses the data file at https://people.ucsc.edu/~mclapham/eart125/data/georoc.csv Rhyolites can be divided into high-silica types (rhyolites with greater than 75% SiO2) and more typical ...
-3
votes
0answers
11 views

Flower diagrams up to 9 sets

I have different lists of elements (OTUs) and I would like to represent them in the so-called flower diagrams, I give you below an explample of my goal. Also, I would like to obtain the elements ...
0
votes
1answer
12 views

R programming, For loop, if else statement not returning correct calculation of median number

I have a big dataframe summary2, containing different keywords, and dates from 2016-2020 for each keyword. So I created a loop for each company, so whenever it gets to 2016 in the dataframe it should ...
0
votes
0answers
6 views

sf: Create GeoPDF using ggplot2 output object

I try to use a map created in ggplot to save as *pdf in order to create a georeferencing pdf using the function sf::st_write() without success. In my example: #Packages library(ggplot2) library(...
0
votes
1answer
17 views

Remove extra row in printing to file

I'm attempting to print to file the output of a str_split operation as follows: s <- t(unlist(str_split("foo_bar_0.5", "_"), use.names = FALSE)) write.csv(s, "test.csv"...
0
votes
1answer
7 views

ggplot2 colors association problem with ifelse

Here my df structure Date VAR Value 1 A 0.1 2 A 0.1 3 B1 0.2 4 B2 0.3 5 B3 0.2 6 A 0.1 7 A 0.1 8 A 0.1 9 B4 0.4 I can plot them. But I have a ...
-2
votes
0answers
16 views

Creating single dataframe from list with mulitple elements

I am looking for help on how to transform the list below to a dataframe/single .csv file with the information formatted in the way per unique game code '200910270CLE' similar to this example without ...
-1
votes
0answers
9 views

Error: Tibble columns must have compatible sizes In R

I retrieve the data from an API of an application. When I convert the data recovered in json in tibble it gives me an error message as shown in the image then for the other endpoints it converts ...
0
votes
1answer
14 views

Use a for loop as many times as the length of a list of igraph.vs objects to create dataframes with the names they include

I have the nodes and edges dataframes below and then I create a graph object gph. After that I create an list of igraph.vs objects named asp with all simple paths. Then I want to be able to use a for ...
0
votes
3answers
18 views

How to store multiple for loops with nested lists?

I am trying to store a nested for loop outcome but I find it hard to do so. This is what I have: library("pageviews") lang = c("it.wikipedia", "de.wikipedia", "fr....
0
votes
0answers
19 views

R matrix values recycling?

I am following this YouTube tutorial on agent-based modelling in R https://www.youtube.com/watch?v=uAeSykgXnhg. I have replicated the code using my own variable names (which helps me understand the ...
0
votes
0answers
12 views

Build a Function for Autocorrelation

I build the below AR(2) model : # Generate noise noise=rnorm(200, mean=0, sd=1) # Introduce a variable ma_1=NULL # Set the value of parameter theta1 theta1=0.7 # Loop for generating MA(1) for(i in ...
0
votes
0answers
14 views

Is it dangerous increasing memory limit in R?

Suppose that you have a huge data set and when you run your code you receive an error Error: cannot allocate vector of size 15.5 Gb in R As I understand that is that the memory that R uses is much ...
0
votes
1answer
9 views

Can't download MRInstruments

I'm super new to all of this so please excuse any mistakes in my terminology. I'm trying to install the MRInstruments package in R using the following- install_github("MRCIEU/MRInstruments") ...

15 30 50 per page
1
2 3 4 5
26234
久草视频新免费_日韩视频一中文字暮_欧美三级片