About Me
The Beautiful science
Leute!!
Suppose you have a list of 20 dataframes, each of data frame has 10 columns but different rows. You want to know the length of rows in each dataframe without using loop in a single line.
sapply(x,function(y)length(y[[1]]))
where x is a list
If you are after a specific column, just replace the number [[1]] with it.
Cheers
Sukhi
-
keynotetis8 likes this
-
robertsonok46 likes this
-
wellmankil likes this
-
gloria2fg likes this
-
biofeed posted this