I have a list of objects containing different numbers of data, on which I want to globally execute the same round
function. Is there a way to do it in one go whilst keeping the objects separate (so that each object corresponds to the data it should contain), without having to go do it manually as follows?
my code when trying to manually iterate the same function for each object
Thanks, Katie
Edit1:
> D41
[1] 1.366 1.223 1.223 2.703 1.205 2.053
> d44
[1] 8.929 13.793
> D41r <- round(D41,2)
> d44r <- round(d44,2)
> D41r
[1] 1.37 1.22 1.22 2.70 1.21 2.05
> d44r
[1] 8.93 13.79
Here I just showed two objects out of the many more objects each with a different number of data.
Is there any way to do create a data frame that has "different number of rows", or to execute one function for each object overwriting itself correspondingly?