lapply
Question regarding llply or lapply - applying functions to data.frames in a list
Dear R user community, I have many data.frames in a list, as follows (only one data.frame in the list of 21 shown for convenience):[详细]
2023-04-08 19:46 分类:问答Assign names from one list to another
I got a bunch dynamically created regressions stored in some list called regressions. Now I´d like to rename their coefficients efficiently. What I have so far is this loop that works:[详细]
2023-04-06 20:17 分类:问答Segmentation Fault working with a list of xts objects in R
I am having trouble working with a list of xts objects.I get different and strange behavior when running lapply on the list elements, and sometimes the program segfaults.I am running R 2.12.2 on Ubunt[详细]
2023-03-27 12:26 分类:问答multiple plots from data frames in a list after a conditional test
I have a tricky problem with applying a function to a list of data frames. Ultimately I want to plot individual time series charts for large data set of drug usage figures.[详细]
2023-03-18 01:38 分类:问答combination of expand.grid and mapply?
I am trying to come up with a variant of mapply (call it xapply for now) that combines the functionality (sort of) of expand.grid and mapply.That is, for a function FUN and a list of arguments L1, L2,[详细]
2023-03-16 05:44 分类:问答Using lapply() for data structured in lists of lists from simulation study
I have run up against the wall regarding the application of lapply() in a simulation study.The data are designed to help us understand how a standardization formula impacts the outcomes of a proposal[详细]
2023-03-13 09:49 分类:问答Extract columns from list of coeftest objects
Is there a function that can extract two or more columns from a coeftest object? This is easy one coeftest object at a time, but can I do the same to a list (other than a for() loop)?[详细]
2023-03-13 09:10 分类:问答Using lapply with changing arguments
R textbooks continue to promote the use of lapply instead of loops. This is easy even for functions 开发者_如何学JAVAwith arguments like[详细]
2023-03-10 12:52 分类:问答Use mapply to fit list of lm models to list of data frames [R]
Is this possible? I can get mapply to work with the help examples, but I can\'t get a trivial example with lm to work. Here\'s my attempt which returns a matrix, instead of a list of lm objects.[详细]
2023-03-09 22:31 分类:问答zipping lists in R
As a guideline I prefer apply functions on elements of a list using lapply or *ply (from plyr) rather than explicitly iterating through them. However, this works well when I have to process one list a[详细]
2023-03-08 20:54 分类:问答