Skip to content
Prev 316366 / 398502 Next

NA and Character(0) in List Element

lapply always yields one output for every input. Try using a for loop and only copying the element once you know you want it. You will need an output index counter that is separate from the for loop index, incremented only when you copy an element.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
"Benjamin Ward (ENV)" <B.Ward at uea.ac.uk> wrote: