Skip to content

sample(ECOLOGY)

Random thoughts on ecology, biodiversity, and science in general

  • About Me
  • Publications
  • CV
  • Photos
  • Contact
  • Blog

Tag: lapply

Continuing a ‘for’ loop in R after an error

May 20, 2013May 20, 20137 Comments

fruitloops

Lately, I’ve been using loops to fit a number of different models and storing the models (or their predictions) in a list (or matrix)–for instance, when bootstrapping. The problem I was running into was the for loop screeching to a halt as soon as a model kicked back an error. I wanted the function to register an error for that entry, then skip to the next one and finish off the loop.

Continue reading →

Latest Tweets

Tweets by jslefche
Blog at WordPress.com.
  • Subscribe Subscribed
    • sample(ECOLOGY)
    • Join 247 other subscribers
    • Already have a WordPress.com account? Log in now.
    • sample(ECOLOGY)
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...