# Copyright 2008 Alexander W Blocker
# You are free to use, modify, and distribute this under the terms of the 
# GNU LGPL license, version 3.0

split.data <- function (data, na.omit=FALSE) {
	names <- colnames(data);
	n <- ncol(data);

	for (i in 1:n) {
		if (!na.omit) {assign(names[i], data[,i], env=.GlobalEnv)}
			else {assign(names[i], na.omit(data[,i]), env=.GlobalEnv)};
	}
}