Skip to main content

All Questions

Tagged with
0 votes
0 answers
78 views

How to iterate across columns to find intersection in R? [duplicate]

I have a data.frame in R which has more or less this structure: structure(list(F1 = c(1, 2, 3, NA, NA), F2 = c(NA, 2, 3, 4, NA ), F3 = c(NA, NA, NA, 4, 5)), class = "data.frame", row.names = ...
Alejandro Carrera's user avatar
0 votes
0 answers
28 views

How to execute code for each element in a list? [duplicate]

I have what had ended up being a long block of code to do some calculations where I currently set the year in which I am interested manually. I am looking to do this instead using a list. Ideally, I ...
JamesW's user avatar
  • 155
1 vote
1 answer
58 views

R code to iterate over lists, combining them into a data frame with grouping variables?

I am tasked with collecting table names, grouping variables, variable names, and variable values from a large number of complex XML Esri Workspace files. At the most basic level, I am having trouble ...
anagler's user avatar
  • 13
1 vote
2 answers
44 views

Looping over a list but using names instead of the actual objects

I am trying to use lapply to apply a function to some dataframes. I have a list containing the names of the dataframes I want to use. The problem is, that when I use lapply on the list it gives me an ...
clarrity's user avatar
1 vote
2 answers
54 views

How can I add a column with values from a list, iterating in a data frame over factor levels?

I am struggling in performing and iterating the following operation in the R environment. Given a data frame df: df <- data.frame(1, 1:12, groups = factor(rep(...
betterL's user avatar
  • 13
1 vote
1 answer
38 views

How to make paired comparison for elements in one list

I have a list with four models as you could see and I am supposed to compare: the first one with the second one the second one with the third one the third one with the last Thus I have proceeded ...
12666727b9's user avatar
  • 1,139
0 votes
2 answers
366 views

Run R script in a loop

I am analysing output of 96 well plates to get maximum growthrate by using the growthrates package in R. The structure of the 96 well plate output file is: Time A1 A2 A3 A4 0 ...
Bandana's user avatar
-1 votes
1 answer
256 views

map function based on a column value of dataframes stored in a list

I am trying to use the map function to do something complex - I'd like to use the values of the Result column per each dataframe I have in a list ( these are monthly dataframes and should be kept ...
Anjeline's user avatar
1 vote
2 answers
77 views

how to use a function with multiple results with groups

I have a little problem for which I could use some help. I defined a function that compute several vectors, based on 2 vectors. The general idea is that the results are linked (which is why I have ...
Francois51's user avatar
0 votes
1 answer
117 views

How to create in R a list for a dataframe containg common character through an iterative function

this is the dataframe with trice repeated comparisons for every outcome variable (so the submutiple level is 12) A tibble: 36 x 10 s .y. group1 group2 n1 n2 p p....
12666727b9's user avatar
  • 1,139
0 votes
1 answer
346 views

Loop through multiple lists to get every iterations in R

Hello I have never written in here because I always found an answer to my problems But now I have one and I can't find a way to resolve it. I have several lists with list in them. Every list is a part ...
FIshcode's user avatar
0 votes
1 answer
65 views

How can I iteratively store several vectors from a list into appropriate columns in a list of dataframes?

I generated 30 imputed dataframes, which are stored in a list list.of.imputed.dfs, which is of classes "mild" "list". Some of the values in the dataframes need to be changed based ...
Alex's user avatar
  • 25
0 votes
1 answer
36 views

R: Remove Rows From Data Frame [i] of List 1 based on Index values from Data Frame [j] of List 2

I have the following problem: I have one list of data frames that includes a heart rate signal for each participant. Furthermore, I have a list of data frames which include the index values of ...
johnson24's user avatar
-1 votes
1 answer
58 views

Using lists and user-generated to run specific commands on multiple variables and datasets

I want to use lists and user-generated to run specific commands on multiple variables and datasets. For examples, I want to turn the table, cut, and color variables into factors using the as.factor(as....
Mel's user avatar
  • 520
1 vote
1 answer
52 views

Using lists to run multiple statistics test with one set of code

I'm interested in using lists to run multiple statistics test with one set of code. For example, I want to run glm() tests that vary in terms of DVs, IVs, data, and family, based on rows in a data ...
Mel's user avatar
  • 520

15 30 50 per page