Byte code version mismatch when using subset <p>I have been working on the same R script now for 5 months, had some minor coding problems, but this morning I got a problem that makes me unable to run the whole script. To clean my imported data I use a lot of subset(), but this morning when running the code I got the Warning:</p> <pre><code>Error in subset(T23810, date &lt; as.Date("2015-10-22")) : byte code version mismatch </code></pre> <p>It appears that I only get this warning after trying to run a subset function, but it blocks my whole script at the moment. What could be the cause and solution for this?</p> <p><strong>EDIT: Reproducible example</strong></p> <pre><code>x = structure(list(names = structure(c(11L, 3L, 5L, 27L, 26L, 15L, 18L, 13L, 8L, 2L, 22L, 12L, 1L, 25L, 29L, 31L, 6L, 23L, 28L, 14L, 19L, 4L, 10L, 16L, 9L, 17L, 21L, 30L, 7L, 6L, 27L, 26L, 12L, 13L, 14L, 4L, 28L, 15L, 31L, 23L, 1L, 22L, 11L, 18L, 3L, 20L, 8L, 5L, 16L, 2L, 25L, 30L, 21L, 4L, 6L, 3L, 5L, 27L, 14L, 11L, 26L, 31L, 13L, 18L, 15L, 1L, 23L, 2L, 8L, 28L, 30L, 20L, 22L, 12L, 10L, 16L, 21L, 25L, 17L, 24L, 32L, 31L, 23L, 26L, 1L, 18L, 11L, 12L, 3L, 15L, 27L, 28L, 5L, 22L, 6L, 17L, 20L, 2L, 8L, 21L, 30L, 13L, 25L, 24L, 7L, 4L, 10L, 16L, 14L), .Label = c("50/50", "Babylon", "Big Rock Market", "Core Gut", "Customs House", "David's Dropoff", "David's Dropoff Deep", "Diamond Rock", "Giles Quarter", "Green Island", "Greer Gut", "Hole in the Corner", "Hot Springs", "Ladder Labyrinth", "Man O War", "Mount Michel", "Muck Dive", "Outer Limits", "Poriotes Point", "Porites Point", "Rays &amp; Anchors", "Shark Shoals", "Tedran", "Tent Boulders", "Tent Deep", "Tent Reef", "Tent Wall", "Third Encounter", "Torens Point", "Torrens Point", "Twilight Zone", "Wells Bay" ), class = "factor")), .Names = "names", row.names = c(NA, -109L ), class = "data.frame") </code></pre> <p>Then if I execute the following:</p> <pre><code>x[x=="Torens Point"] = "Torrens Point" x[x=="Poriotes Point"] = "Porites Point" x = droplevels(subset(x, names != "Muck Dive")) </code></pre> <p>I get the error: </p> <pre><code>Error in subset(x, names != "Muck Dive") : byte code version mismatch </code></pre>