Top "Lapply" questions

lapply is a function in R that returns a list of the same length as given argument X, each element of which is the result of applying given function to the corresponding element of X

Grouping functions (tapply, by, aggregate) and the *apply family

Whenever I want to do something "map"py in R, I usually try to use a function in the apply …

r lapply sapply tapply r-faq
Read all files in a folder and apply a function to each data frame

I am doing a relatively simple piece of analysis which I have put into a function, on all the files …

r list lapply summary
How to index an element of a list object in R

I'm doing the following in order to import some txt tables and keep them as list: # set working directory - …

r list indexing lapply read.table
passing several arguments to FUN of lapply (and others *apply)

I have a question regarding passing multiple arguments to a function, when using lapply in R. When I use lapply …

r lapply
Convert several columns from integer to numeric in R data.frame

I would like to convert columns from 2 to 13 (the last one) from integer to numeric. For one column, I use …

r type-conversion lapply
Read multiple CSV files into separate data frames

Suppose we have files file1.csv, file2.csv, ... , and file100.csv in directory C:\R\Data and we want to …

r csv file lapply
Access lapply index names inside FUN

Is there a way to get the list index name in my lapply() function? n = names(mylist) lapply(mylist, function(…

r lapply names indices
How do you read multiple .txt files into R?

I'm using R to visualize some data all of which is in .txt format. There are a few hundred files …

r lapply fread read.table readr
Access and preserve list names in lapply function

I need to access list names inside the lapply function. I've found some threads online where it's said I should …

r names lapply
Using lapply to apply a function over list of data frames and saving output to files with different names

I have a list of data frames and have given each element in the list (e.g. each data frame) …

r dataframe lapply